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
array.prototype.junk breaks jqgrid grouping?
21/10/2010
21:29
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

27/10/2010
18:26
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

28/10/2010
22:33
Avatar
benzocab
Member
Members
Forum Posts: 6
Member Since:
21/10/2010
sp_UserOfflineSmall Offline

Hi Tony. This does work now. I haven't fully reimplemented into our app with tons of prototypes, but it works on my simple app with two prototypes defined, which used to break with the previous version.

Thanks!

Ben

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information