Reputation: 3055
I have a grid like this
var groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
groupHeaderTpl: 'Invoice: {invoice_number} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})'
});
{
xtype : 'grid',
store : Ext.getStore('invoice_items'),
columns : [
{ text: 'Invoice Number', flex: 1, dataIndex: 'invoice_number', hidden:true },
{ text: 'Item Code', flex: 1, dataIndex: 'item_code'},
{ text: 'Description', flex: 1.5, dataIndex: 'description' }
],
features: [groupingFeature]
}
im using hidden filed invoice_number to group this grid and i have the output like this
what i want to do is show the grouped invoice number in the group header. is it possible in extjs4? how to do it?
Regards
Upvotes: 1
Views: 4287
Reputation: 3055
found the solution. i though i had to put group column name here
groupHeaderTpl: 'Invoice: {invoice_number} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})'
but once i replace it with Invoice: {name}
value of the group column shows.
Upvotes: 2