Forum
17:40
10/01/2010
I am looking for example on how to persist which columns are visible or hidden based on the end users preferences, figure the cleanest way to do this is with cookies. Also I would like to do the same with filtering, where I have multipleSearch set to true.
I found an example on how to set the default sort using onSortCol property, like this:
<here's how to set the cookie on the sort stuff>
onSortCol: function (indexName, indexCol, sortOrder) {
$.cookie("index", indexName);
$.cookie("order", sortOrder);
}
<here's how to get the cookie for use>
sortname: $.cookie("index") ? $.cookie("index") : "myDefaultColumnName");
sortorder: $.cookie("order") ? $.cookie("order") : "asc");
Tips for how to do this with showing/hiding columns and the filtering of the data would be very much appreciated.
Thanks in advance for any help.
20:57
Moderators
30/10/2007
Hello,
I think that this is a little bit difficult, but if you use colunmChooser you can store in cookie the colModel in done function
http://www.trirand.com/jqgridw.....mn_chooser
Then you can put the column model the same way as the sorting.
Be a car full on this, since the cookie is limited by size.
Best 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:
38 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