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
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.
Sorry Abu but everywhere I put
$('#list1').gridState().remove('gridState-list1');
Firebug alert me:
TypeError: $(…).gridState is not a function.
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.
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 ]