Forum
20:26
Hi,
jqGrid is a fantastic product. Keep up the good work!
If I use setGridParam() to set jqGrid params (saved in cookie for example) which includes colModel params of 'hidden = true' for some columns, then trigger a reload so the param changes are visible, the column titles do not get refreshed which means they remain visible even though the data for that column has been hidden.
To reproduce:
- Open fresh jqGrid
- Use the Show/Hide Columns widget to hide some columns
- Save the params somewhere using getGridParams() function
- Do a browser refresh to get a fresh jqGrid which has all columns visible
- Use the setGridParams() function with the data saved in step 3 as the argument to set the grid parameters
- Trigger a reload of the jqGrid
Also, is there a function to redraw the grid without re-loading the data?
Cheers,
Matt.
07:30
Moderators
30/10/2007
Hello,
You can not do this - see form post on this
5. Use GridUnload method to clear the grid and its parameters.
6. set jqGrid with the saved parametrs. (you should not use reload in this case)
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.
18:10
OK, I've finally worked it out - I think. In order to dynamically load a previously saved layout for a grid, the following conditions need to be met:
- The saved layout (saved after using the JSON.stringify(myjqGridObject.getGridParam()) method) must be saved from a grid which did *not* use a jQuery object to specify the "pager" option when it was created.
- The existing grid (which you are wanting to redraw with the saved layout) needs to be first cleared by using the GridUnload() method.
- A new grid needs to be created on the same HTML element as the previous grid, using the saved layout from step 1 as the argument. eg $('#myGrid').jqGrid(JSON.parse(savedParamsString));
02:28
Moderators
30/10/2007
Hello,
I think no.
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.
Most Users Ever Online: 715
Currently Online:
90 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