Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Save state of grid
23/03/2010
15:29
Avatar
janke
Member
Members
Forum Posts: 8
Member Since:
22/03/2010
sp_UserOfflineSmall Offline

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

function save_state(){
    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

25/03/2010
09:45
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

23/06/2010
10:56
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

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... 😀

23/06/2010
15:09
Avatar
AdytmRO
Romania
Member
Members
Forum Posts: 24
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

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

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information