Forum


12:34

12/11/2010

I need to solve the following requirement:
The users of my jqgrid would like to be able to save the current state of the jqgrid filter so that it can be reloaded later. I have looked around on the web and found people with similar requirements. The first thing I tried was to use this to fetch the filter state:
, and this to reload it:
$("#MyGrid").setGridParam(filter);
$("#MyGrid").trigger("reloadGrid");
This partly worked: If I set a filter value in the filter toolbar and saved it, it would be active when I reload it, but here is what's not working:
1: It does not seem to load the advanced filters (filter dialog box). Only toolbar filter is loaded
2: Row ordering is not loaded
3: It does not populate the toolbar textboxes with the values. So if I load a filter with "ID=32", I would like the text box for the ID column in the filter toolbar to say "32" so you know what filter is currently active.
So my question is: Am I on the right track with using get/setGridParam for this functionallity? When I look at the filter object that is persisted, it seems to contain all the info I want to save (also information about the advanced filter dialog and row ordering), but it is just not properly loaded.
About number problem number 3: Is there any neat way for doing this automatically, or do I have to parse the filter object and "manually" insert the filter values into the text boxes and dropdowns? I am imagining this would be more difficult to do for the advanced filter dialog, where I actually need to create new "filter rows", and not just set a value in a text box
Will be thankful for all hints and help! I am not very skilled in jqgrid yet, but I am learning
Most Users Ever Online: 715
Currently Online:
68 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