I recently tested venky0589's MultiGroupingPanel control on Ext 3.3 beta 2 and found that despite being coded for Ext 2, the control successfully performed multiple grouping on Ext 3.3 beta 2. Thing is, the grouped elements did not expand or contract; when the user attempted to operate them, an error was generated in in file ext-all-debug.js, line 5129: "s.replace is not a function". I believe that some of the standard GridView event handlers were called despite a MultiGroupingView configuration; this error can be reproduced quite easily with Ext 3.3 beta 2, a modestly-configured Apache web server, and the code from venky0589's thread on his seminal grid control. Has anyone managed to get the MultiGroupingPanel control working with Ext 3.3 beta 2?

8 Nov 2010, 7:35 AM

karimchebani

I got the same issue, if I found something, I will post here. (If you found a fix, please post it ^^)

I wonder if it's planed to support multiple grouping in the future of ExtJS. I would really appreciate such a feature! Does anybody know if this is planed for ExtJS?

19 Nov 2010, 3:27 PM

cristinadelosa

karimchebani, how it solves the problem?

6 Dec 2010, 6:06 AM

yyogev

I ran into this problem too.
The problem is that variable "field" is expected to be a string, while in multi-grouping view it is an array.

30 Jan 2011, 2:41 AM

yyogev

Solved!

The problem in ExtJS 3.3 happens in the processEvent function of groupingView, which expects getGroupField to return a string with the name of the field. In the Multi-Grouping view the returned value is an array of field names.

I fixed this by copying the processEvent code from GroupingView.js to MultiGroupingView:

Code:

processEvent: function(name, e)
{
Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
if (hd)
{
// group value is at the end of the string
var field = this.getGroupField();
// in MultiGroupingView field is an array of field names,
// so take just the last field name
if (typeof field == "object" && field.length)
field = field[field.length-1];
var prefix = this.getPrefix(field);
var groupValue = hd.id.substring(prefix.length);
var emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd');
// remove trailing '-hd'
groupValue = groupValue.substr(0, groupValue.length - 3);