Forum


15:29

22/03/2010

Is it possible to is save the state (filters,order, page,…) of the grid and retrieve this after vivit an other page ?
I try to do this function for save state on a click button
var state_grid = $("#list2").jqGrid('getGridParam');
$.cookie("gridState", state_grid , { expires: 1 });
}
And
param_grid = {
url:'server.php,...
}
if ($.cookie("gridState"))jQuery("#list2").jqGrid($.cookie("gridState"));
else jQuery("#list2").jqGrid(param_grid);
but firefox respond uncaught exception: jqGrid - No such method: [object Object]
some one could help me ?
Thanks
09:45

Moderators
30/10/2007

Hello,
It seems like in your second page jqGrid java script files are not loaded.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Hy,
I have the same problem.
The jqGrid.js is loaded. every js files are loaded, but still the same problem.
:(( uncaught exception: jqGrid - No such method: [object Object] :((
if ($.cookie("gridState")){
$("#listSurveys").jqGrid($.cookie("gridState"));
}
the value of the cookie is [object Object], so i think that gridParams object
is stored in the cookie.
Is jqGrid able to load the config from the object stored into the cookie ?
Any tips are welcomed... 😀
Update:
Cannot store gridParams into cookie.
if u do:
var state_grid = $("#list2").jqGrid('getGridParam');
$.cookie("gridState", state_grid , { expires: 1 });
it will store [object Object] as a string :).
even if u json state_grid ... the amount of data is too big to be stored into cookies.
So i have retreived only the postData from the grid and stored into cookie.
After this ... i check . if the cookie exists, i read the postData and try to reload the grid with the new postData.
I use jquery.json plugin.
regards,
AdytmRO
Most Users Ever Online: 715
Currently Online:
47 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66