Forum
10:20
12/01/2010
When reloading the grid (not the whole page, just the grid) the current scroll position and the collapsed state of the groups is lost. I've been thinking about storing those parameters in a localStorage... sure sometimes the reload will give you such different data that the position will make no sense, but 90% of the time you'll be close to where you were.
Has anyone tried hooking this idea into jqGrid? Is this someething that jqGrid itself might support natively?
10:33
12/01/2010
To reply to my own request here: how about adding an event to the existing list ( http://www.trirand.com/jqgridw.....iki:events ) which is fired on collapsing any grouping? That would allow us to hook in some code and save that state somewhere such as LocalStorage.
Tony, if I were to develop a patch to support this, would you prefer just an event added to collapsing groups, or should jqGrid directly support the ability to save state to localStorage? Would you consider the latter something jqGrid should do, or the developer implement themselves?
Ari
02:45
02/02/2011
we just develop a patch to keep collapsed state. we added new event named 'onClickGroup'. This event fires after clicking group (to expand or collapse group). it has 2 parameters, group id (string) and collapsed (boolean). 'groupid' is a combination of grid id plus 'ghead_' plus the current count number in the grid view. 'collapsed' is current group's collapse status.
please visit https://github.com/byakugie/jqGrid/commit/1adcbfb1538a40796e27282fda89a79bd4339dbf to see that patch
please visit https://github.com/byakugie/clockingit/commit/bc56e361b44cd57dd41d52e4279119ac6aae2952 to see how we are using 'onClickGroup' event to save collapsed state in Jobsworth project. (also we use 'loadComplete' event to restore collapsed state)
Most Users Ever Online: 715
Currently Online:
72 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