Forum
18:46
29/06/2010
I am trying to figure out how to make grouping work, but am not having much success. I have followed all the tutorials etc. but my grids are never grouped - I am sure I am missing something simple. What are the "requirements" to make it happen? I have pulled code exactly from the 3.8 remote demo, but it wont work..
In ALL cases data is displayed in a standard flat table listing...
$("#masterList").jqGrid({
url: "sample.json",
datatype: "json",
colNames: ['Inv','Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[
{name:'id',index:'id', width:60, editable:true, sorttype:'int',align:"center"},
{name:'invdate',index:'invdate', width:90, sorttype:'date', formatter:'date', datefmt:'d/m/Y',align:"center"},
{name:'name',index:'name', width:100,summary:'count',summaryTpl:'({0}) total'},
{name:'amount',index:'amount', width:80, align:"right", sorttype:'number',formatter:'currency',summaryType:'sum'},
{name:'tax',index:'tax', width:80, align:"right",sorttype:'number',formatter:'currency',summaryType:'sum'},
{name:'total',index:'total', width:80,align:"right",sorttype:'number',formatter:'currency',summaryType:'sum'},
{name:'note',index:'note', width:120, sortable:false,editable:true}
],
rowNum: 10,
forceFit: true,
rowList: [5,10,20,30],
loadonce: true,
height: 'auto',
width: 640,
pager: '#masterPager',
sortname: 'name',
viewrecords: true,
sortorder: "asc",
altRows: true,
altclass: "ui-table-altrow",
grouping: true,
groupingView: {
groupField: ['name'],
groupColumnShow: [true],
groupText: ['<b>{0}</b>'],
groupCollapse: true,
groupOrder: ['asc'],
groupSummary: [true],
showSummaryOnHide: true,
groupDataSorted: true
},
footerrow: true,
userDataOnFooter: true
});
mse
Most Users Ever Online: 715
Currently Online:
59 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