Reputation: 135
I have name, type and parent. I am able to group by 'type'. Is it possible to then group the resulting groups by 'parent' as well?
What I have tried in-order to group by 'type':
initComponent: function(){
Ext.apply(this, {
:
:
features: [Ext.create('Ext.grid.feature.Grouping', {
groupHeaderTpl: '{columnName}: {name} <tpl if="children">({children.length} ' + this.items + ')</tpl>'
})],
forceFit: true,
store: Ext.create('Ext.data.Store', {
groupField: 'type',
model: 'model.props',
proxy: {
type: 'memory',
reader: {
type: 'json',
rootProperty: 'props'
}
}
})
});
}
This groups by 'type'. Now I need each resultant group to be grouped by 'parent' as well
Upvotes: 2
Views: 546
Reputation: 20224
Not with standard ExtJS, a normal grid and groupers. These support only grouping by one property. But:
Someone has done it for ExtJS 4 as a custom extension, which you can maybe adapt for your version of ExtJS: https://www.sencha.com/forum/showthread.php?226739 https://www.sencha.com/forum/showthread.php?242633
You can look into the standard TreePanel
/TreeStore
combination, in which you can build a hierarchy with arbitrary depth.
Upvotes: 1