PDA

View Full Version : Store Grouping and Subgrouping



brunoferoleto
24 May 2012, 5:31 AM
Hi! Is there a way to have groups and subgroups in a store?

I have this data as an example:



{groupId: 1, group: 'MyGroup1', projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 112, description: 'Integrate 2.0 Forms with 2.0 Layouts', estimate: 6, rate: 150, due:'06/24/2007'},
{groupId: 1, group: 'MyGroup1', projectId: 100, project: 'Ext Forms: Field Anchoring', taskId: 113, description: 'Implement AnchorLayout', estimate: 4, rate: 150, due:'06/25/2007'},
{groupId: 2, group: 'MyGroup2', projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 101, description: 'Add required rendering "hooks" to GridView', estimate: 6, rate: 100, due:'07/01/2007'},
{groupId: 2, group: 'MyGroup2', projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 102, description: 'Extend GridView and override rendering functions', estimate: 6, rate: 100, due:'07/03/2007'},
{groupId: 2, group: 'MyGroup2', projectId: 101, project: 'Ext Grid: Single-level Grouping', taskId: 104, description: 'Testing and debugging', estimate: 6, rate: 100, due:'07/06/2007'},
{groupId: 2, group: 'MyGroup2', projectId: 102, project: 'Ext Grid: Summary Rows', taskId: 105, description: 'Ext Grid plugin integration', estimate: 4, rate: 125, due:'07/01/2007'}


So I want to group by 'groupId' and subgroup by 'projectId'. I want it because I want to organize my data and also want to show/hide the info.
If there is no straight way to do this is there, at least, a possibility to make a store of stores so I can do this grouping the inner stores and then grouping the outer stores?

MaximusDecimus
24 May 2012, 6:19 AM
Maybe something like:



{group1 : {data1: 'hello', data2: 'blabla'}, group2: {data1: 'ole', data2: 'qwerty'}}