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
Disable groupfield sort
19/04/2012
01:39
Avatar
betolj
Brazil
New Member
Members
Forum Posts: 2
Member Since:
19/04/2012
sp_UserOfflineSmall Offline

First, i'd like to say that this is a great project - congratulations!

My English is not very good, but I'll try.
So, I'm working on a firewall solution and would like to share the experience with jqgrid. I get the data remotely in json format, but i manage the information only in memory (client side). For this reason I needed to use the "loadonce" and use clientArray in editUrl. And I save everything (with ajax) in the end (save button).

The difficulty was that i get the data sorted by the server. But, to update "grouping" a need a "reloadGrid" after insert, edit, clone or delete operations.  I can not sort by "groupField" but by "id" (rowid).  I tried various settings to disable sorting on the client side.

So I made a change in jqgrid.

---- my jqGrid def

           groupingView : {
              groupField : ['inPol'],
              groupColumnShow : [false],
              groupCollapse : false,
              groupDataSorted : false,
              groupSorted: false,
              groupText : ['<b>{0}</b>  {1}']

           },

----

The new option is "groupSorted".
I can disable grouping client sort in this way.

The change in jquery.jqGrid.min.js was very simple...

...if(a.p.grouping){if(u.groupSorted===true){r.orderBy(C,u.groupOrder[0],p[0].stype,p[0].srcfmt)};u.groupDataSorted=true}...
...k=d.groupCollapse?d.plusicon:d.minusicon,l,r,m;if(!d.groupDataSorted && d.groupSorted===true){d.sortitems[0].sort();...

I saw that other people have also had the same problem.
How the change is minimal, I would propose this as a patch for future versions. So no need to change manually when upgrading too.

Thanks

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
34 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