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
"groupText" in groupingView parameter customizable by a function
12/12/2011
18:38
Avatar
pramix
New Member
Members
Forum Posts: 1
Member Since:
12/12/2011
sp_UserOfflineSmall Offline

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>";

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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