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_Related Related Topics sp_TopicIcon
array.prototype.junk breaks jqgrid grouping?
21/10/2010
22:47
Avatar
benzocab
Member
Members
Forum Posts: 6
Member Since:
21/10/2010
sp_UserOfflineSmall Offline

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

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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