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
Local sort grouped data
17/05/2011
00:03
Avatar
gfricke
New Member
Members
Forum Posts: 1
Member Since:
16/05/2011
sp_UserOfflineSmall Offline

I have a grid, I get the data through ajax based on user interaction with my site (I don't want to call from the grid).

I bind the data, but the group sorts on the groupfield alpa.  I want it to honor the order of my collection (e.g. groupDataSorted:true) but it doesn't work with local binding.

What are my options?  I want the groups themselves sorted on a different field than the groupfield, it is exactly how I want in my collection but it keeps resorting…

Please note the columns call to javascript functions to build elablorate cells:

  jQuery("#grdDocuments").jqGrid({
           datatype: "local",

           height: 'auto',
           colNames: ['', 'CategoryGroupingKey'],
           colModel: [
           { name: 'DocumentTitle', index: 'DocumentTitle', width: 400, sortable: false, formatter: CreateColumnModel},
           { name: 'CategoryGroupingKey', index: 'CategoryGroupingKey' }
       ],
           rowNum: 30,
           rowList: [10, 20, 30, 40, 50],
           pager: "pgrDocuments",
           viewrecords: true,
           grouping: true,
           groupingView: {
               groupField: ['CategoryGroupingKey'],
               groupColumnShow: [false],
               groupText: ['<label class="Text" style="font-size:17px"><b>{0}</b></label>']
              
           }
       });

19/04/2012
04:09
Avatar
betolj
Brazil
New Member
Members
Forum Posts: 2
Member Since:
19/04/2012
sp_UserOfflineSmall Offline

Hello

I am also in the same issue.
For now I change the source of jqGrid...

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();…

— my jqGrid def

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

},

Thus the sorting is made by programming.
It worked for me.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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