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
Help with cookies for columns visible, and filtering
10/01/2010
17:40
Avatar
nhbrewer
Member
Members
Forum Posts: 13
Member Since:
10/01/2010
sp_UserOfflineSmall Offline

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.

14/01/2010
20:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information