Persist settings don't died

QuestionsPersist settings don't died
Massimo Gagliardi asked 8 years ago

Hi Abu,
to manage persist settings to every grid of my many programs I modified the state options in this way:
"stateOptions": {
storageKey: "gridState-<?php echo $tb;?>",
columns: true, // remember column chooser settings
selection: true, // row selection
expansion: true, // subgrid expansion
filters: true, // subgrid expansion
pager: true, // page number
order: true // field ordering
}
where $tb is the name of program.
This because otherwise equal column names in the different pgm created me many problems.
This solutions works fine but seems impossible to delete single state options.
I used jQuery.jStorage.deleteKey('gridState-<?php echo $tb;?>')
I deleted the cookie jqgrid_colchooser
I closed the browser.
I turned off the PC!
Nothing
Have you some other suggestions?
Massimo Gagliardi
Thanks in advance

6 Answers
Abu Ghufran answered 8 years ago

You don't really need to turn PC off (smile)
Here is the JS code to remove it:

$('#list1').gridState().remove('gridState-list1');

Where list1 is grid id, and gridState-list1 is storage key.

Massimo Gagliardi answered 8 years ago

Sorry Abu but everywhere I put
$('#list1').gridState().remove('gridState-list1');
Firebug alert me:
TypeError: $(…).gridState is not a function.

Abu Ghufran answered 8 years ago

You can refer demos/misc/persist-settings demo.
Make sure you include all JS files as in that demo.
Forget settings button show how to remove persistance.

Massimo Gagliardi answered 8 years ago

In my folder demos/misc/persist-settings I didn't find nothing to remove persist settings
In live demo this happens:
Sorry xxx.xxx.xxx.xxx, your request cannot be proceeded.
For security reason, it was blocked and logged.
incident ID: [ #7176051 ]

Massimo Gagliardi answered 8 years ago

This is perfect!
Thanks

Your Answer

9 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?