Hi Peter,
I use savestate to get the state of a grid. My wishes are on the life time of the saved state (permanent or just for the session), the name of the saved state and a method to delete a saved state.
For the moment, i write this
function writestate () {
var state = $("#jqxgrid").jqxGrid('savestate');
localStorage.removeItem("jqxGridjqxgrid");
sessionStorage.setItem ("jqxmyname", JSON.stringify(state));
}
function loadstate () {
var state = sessionStorage.getItem("jqxmyname");
if (state) {
$("#jqxgrid").jqxGrid('loadstate', JSON.parse(state));
}
}
the functions are handled on events on the grid (savestate) and on ready (loadstate).
it will be easier to have something like that
$("#jqxgrid").jqxGrid('savestate', 'session', 'jqxmyname');
$("#jqxgrid").jqxGrid('loadstate', 'session', 'jqxmyname');
$("#jqxgrid").jqxGrid('removestate', 'session', 'jqxmyname');
and samething with autosavestate and autoloadstate
autosavestate : true,
autoloadstate : true,
autosavestatestorage: 'session|local',
autosavestatename: 'the_name_of_the_state'
But it’s just an idea…