View Full Version : Grouped Grids and Store config

5 Mar 2015, 9:53 AM
I'm using Ext. and have run into an issue with grouped grids and the store config. If I want the grid to be able to NOT be grouped I have some code that will use the store.clearGroup() to create a 'flat' list. However, if I don't specify a groupField on the store for the inital case of the 'flat' group, then programatically use the store.group('fieldhere') it will group on the field but the grid starts to have odd behaviour. For example, if it's grouped, then I select a row in a lower group, collapse a group higher up in the groups, then I can't select anything in the lower group that already has a selection.

If I pass in the groupField in the store as part of the initial config, then I don't have this issue. See fiddle:


Specific steps in this fiddle:
1. The initial view should not be grouped. Select 'department' in the combobox above the grid.
2. The grid is grouped by department. Select a row in the last department group.
3. Collapse the first department group.
4. try and select another row in the last department group. It wont' work.

if you uncomment line 9, then run again the steps will work.

I'm just wondering if there is a better way to handle this other than forcing some groupField in the store, then clearing the grouping upfront to force a 'flat' view first.

6 Mar 2015, 5:46 AM
You are using framework v: Ext.
But fiddle example is in version: Ext.

6 Mar 2015, 11:19 AM
I thought I might have saved it for testing purposes as 5.1, but after saving it again under v4.2.2.1144 then exiting if I hit that url as a guest user it changes back to 5.x in fiddle. I opened the fiddle again and sure enough it's 5.x again so I'm not sure if it's a fiddle bug or something I'm doing incorrectly.

Either way you can just change the version as a guest to see the bug.


6 Mar 2015, 12:26 PM
I have changed the version and did not notice the bug.