how to show grouped value in Extjs 4 grid groupHeader?
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
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.
精彩评论