Forum
18:38
12/12/2011
I add this line of code into jqgrid for "groupText" modification in groupingView function because groupText parameter is too limitied.
With this you can set a function to groupText parameter when you define your grid.
I'd like if this patch can be put in next version of jqgrid 🙂
Example:
[.......]
grouping:true,
groupingView : {
groupField : ['groupId'],
groupColumnShow : [false],
groupText : function(group) { return myCustomGroupdata[group].someStringAttr+" - Total {1}"; }
},
[.......]
Patch code at line 10381 of jqGrid 4.2.0 :
try {
_groupText = jQuery.isFunction(grp.groupText)? grp.groupText(gv) : grp.groupText[0];
groupText = (typeof _groupText).toLowerCase() != "string" || _groupText == "" ? "{0}" : _groupText;
} catch(egt) {
groupText = "{0}";
}
str += "<tr id=""+hid+"" role="row" class= "ui-widget-content jqgroup ui-row-"+$t.p.direction+""><td colspan=""+colspans+"">"+icon+$.jgrid.format(groupText, gv, grdata[n].length)+"</td></tr>";
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