Forum
00:03
16/05/2011
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>']
}
});
04:09
19/04/2012
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66