Forum
21:29
21/10/2010
I recently started using jqgrid, adding it to one of our projects. In our project we have several prototypes defined for the Array object ( obj.contains(x), etc ). I added the grid control and it works fine, but when I added the grouping module with summary footers it returns an error "jqGrid - No such method: groupingCalculations.undefined". I basically have a few records with the Summary Footers, since we need aggregates for several fields:
var mydatax = [
{ 'Eureka ID': '154896', 'Agent': 'Felix Z' }
];
jQuery("#list47").jqGrid({
data: mydatax,
datatype: "local",
height: 'auto',
rowNum: 50,
//rowList: [10, 20, 27],
colNames: ['Eureka ID', 'Agent'],
colModel: [
{ name: 'Eureka ID', index: 'Eureka ID', width: 80, summaryType: 'avg', summaryTpl: '<b>AVG: {0}</b>' },
{ name: 'Agent', index: 'Agent', width: 80 }
],
pager: "#plist47",
viewrecords: true,
sortname: 'Agent',
grouping: true,
groupingView: {
groupField: ['Agent'],
groupSummary: [true],
groupColumnShow: [true],
groupText: ['<b>{0}</b>'],
groupCollapse: false,
groupOrder: ['asc']
},
caption: "Grouping Array Data"
});
And, a simple prototype will do the trick:
Array.prototype.junk = function(v) {
return this.length;
}
You must also have "groupSummary: [true]". I'm using the latest jquery.jqGrid-3.8. Anybody have any idea how to get around this, other than "don't use the prototypes!"?
Thanks,
Ben
18:26
Moderators
30/10/2007
Hello,
Thanks. Yes this is a bug. The fix is in GitHub.
Please let me know if the fix work for you
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
27 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