Is it possible to group a single record into multiple groups? Let's say I have the following code:
Ext.onReady(function() {
var store = Ext.create('Ext.data.Store', {
fields: ['name', 'profession'],
groupField: 'profession',
data: [
{name: 'jack johnson', profession: 'surfer'},
{name: 'dan aykroyd', profession: 'ghostbuster'},
{name: 'dwayne johnson', profession: 'actor'},
{name: 'chino moreno', profession: 'musician'}
]
});
var grid = Ext.create('Ext.grid.Panel', {
store: store,
columns: [{
text: 'Name',
dataIndex: 'name',
flex: 1
}, {
text: 'Profession',
dataIndex: 'profession',
flex: 2
}],
features: [{ftype: 'grouping'}],
height: 400,
width: 400,
renderTo: Ext.getBody()
});
});
Don't read too much into the professions because this is a toy example, but let's say I want to group Dan Aykroyd into two groups... "ghostbuster" and "musician." However, I don't see any examples of this online, so I'm wondering if it can be done. It seems like it can be done because I'm under the assumption that a filter is applied to the store, so it should be possible, but I have been known to be wrong.
If anyone has any insight, that'd be awesome! Thanks.
**Cross posted from Sencha forums.