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
Keep scroll position and group collapse state through reload
21/01/2011
10:20
Avatar
ari
Member
Members
Forum Posts: 10
Member Since:
12/01/2010
sp_UserOfflineSmall Offline

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?

01/02/2011
10:33
Avatar
ari
Member
Members
Forum Posts: 10
Member Since:
12/01/2010
sp_UserOfflineSmall Offline

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/02/2011
02:45
Avatar
byakugie
New Member
Members
Forum Posts: 1
Member Since:
02/02/2011
sp_UserOfflineSmall Offline

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)

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information