Grace
Grace

Reputation: 135

Is it possible to do grouping within groups using extjs?

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

Answers (1)

Alexander
Alexander

Reputation: 20224

Not with standard ExtJS, a normal grid and groupers. These support only grouping by one property. But:

Upvotes: 1

Related Questions