-
19 Sep 2010 6:12 AM #1
MultiGroupingPanel on Ext 3.3 beta
MultiGroupingPanel on Ext 3.3 beta
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 #2
I got the same issue, if I found something, I will post here. (If you found a fix, please post it ^^)
-
8 Nov 2010 7:47 AM #3
I found where the problem is :
Ext-all-debug.js in GroupView definition line 50816 :
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){ var field = this.getGroupField(), prefix = this.getPrefix(field), groupValue = hd.id.substring(prefix.length), emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd'); // <--- HERE IS THE PROBLEM groupValue = groupValue.substr(0, groupValue.length - 3); if(groupValue || emptyRe.test(hd.id)){ this.grid.fireEvent('group' + name, this.grid, field, groupValue, e); } if(name == 'mousedown' && e.button == 0){ this.toggleGroup(hd.parentNode); } } }
-
11 Nov 2010 3:33 AM #4
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 #5
-
6 Dec 2010 6:06 AM #6
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.Yaron Yogev
IT Software Developer
-
30 Jan 2011 2:41 AM #7
Solved!
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); // also need to check for empty groups if(groupValue || emptyRe.test(hd.id)){ this.grid.fireEvent('group' + name, this.grid, field, groupValue, e); } if(name == 'mousedown' && e.button == 0){ this.toggleGroup(hd.parentNode); } } }Yaron Yogev
IT Software Developer
-
31 Jan 2011 4:54 AM #8
What version multi grouping did you use?
-
31 Jan 2011 5:09 AM #9
I used a modified version based on the version from galdaka
I used a modified version based on the version from galdaka
I used a modified version of the multi-grouping grid based on the version from galdaka.
The one I use has some modifications to make it work with summary and editor grid.
I attach it here so you can use. It includes the latest fix for 3.3.0.
multi_grouping_with_edit_and_summary.zipYaron Yogev
IT Software Developer
-
2 Feb 2011 5:16 AM #10
some nodes don't collapse. Have you got any example grid?
Similar Threads
-
How to set start/end TIME for Ext.calendar.CalendarPanel (Ext 3.3. beta)
By omermx in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 8 Dec 2010, 12:21 PM -
How can we make groupField to be Selectable in Ext.ux.MultiGroupingPanel
By ramana_l_v in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 31 Dec 2009, 4:47 PM -
Ext.nd Beta 1
By RWaters in forum Ext.nd for Notes/DominoReplies: 12Last Post: 14 Feb 2008, 12:53 PM -
Ext 2.0 Beta 1 Now Available
By ReyBango in forum Community DiscussionReplies: 4Last Post: 12 Oct 2007, 6:04 AM -
[beta] Ext.ux.ItemSelector (part of Ext.ux.Multiselect v1.2)
By tjstuart in forum Ext 1.x: User Extensions and PluginsReplies: 36Last Post: 20 Sep 2007, 3:42 PM


Reply With Quote