-
9 Aug 2010 11:33 AM #1
[OPEN-1189] remote grouping grids refresh twice on group by click
[OPEN-1189] remote grouping grids refresh twice on group by click
This probably isn't very noticeable until you have different values returned from the server for a field depending on whether or not it's grouped.
For example, and in my case, if my grid is not grouped by the project field, the value for the project field may be '3 Projects', but if it is grouped by the project field, the server returns 3 records instead of one, each with it's own project value (the name of the project). The objective is to show the same record 3 times in the grid, once in each of the 3 different groups.
The grid refreshes before the server returns the data, causing it to group on the value '3 Projects', which is not correct. Once the server data is returned it refreshes again with the correct group field values.
I'm not sure of the BEST way to fix this, but here is what I did...
Code:view = new Ext.grid.GroupingView({ groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Documents" : "Document"]})', hideGroupedColumn: true, //Fix for remote grouping causing view to refresh twice onGroupByClick : function(){ this.enableGrouping = true; this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); this.grid.fireEvent('groupchange', this, this.grid.store.getGroupState()); this.beforeMenuShow(); // Make sure the checkboxes get properly set when changing groups if (!this.grid.store.remoteGroup) this.refresh(); //Don't refresh now, store load event will cause refresh }, });Last edited by damon1977; 9 Aug 2010 at 11:42 AM. Reason: Specify Ext build number
-
10 Aug 2010 7:55 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
Thanks for the report.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Remote Loading Items, Remote Checkbox Group Ext.ux.RemoteCheckboxGroup
By bartonjd in forum Ext 3.x: Help & DiscussionReplies: 19Last Post: 20 Jun 2012, 5:44 AM -
show in groups not working when remote sorting and remote grouping is used
By xrx215 in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 16 May 2011, 10:03 PM -
Remote Sort, Remote Group, Remote Paging events.
By FCTim in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 15 Jun 2010, 10:05 AM -
Remote Loading Items, Remote Checkbox Group Ext.ux.RemoteCheckboxGroup
By shahrzad in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 29 May 2010, 12:57 AM -
Change Grouping Grid Group Row Click Behavior
By jurban in forum Ext 3.x: Help & DiscussionReplies: 7Last Post: 18 Oct 2009, 9:18 AM


Reply With Quote