如何在Extjs 4网格groupHeader中显示分组值? [英] how to show grouped value in Extjs 4 grid groupHeader?
本文介绍了如何在Extjs 4网格groupHeader中显示分组值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个像这样的网格
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
我想做的是在组标题中显示分组的发票编号.在extjs4中有可能吗?怎么做?
what i want to do is show the grouped invoice number in the group header. is it possible in extjs4? how to do it?
致谢
推荐答案
找到了解决方案.我虽然必须在这里输入组列名称
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" : ""]})'
但是一旦我将其替换为发票:{name}
but once i replace it with Invoice: {name}
组列的值.
这篇关于如何在Extjs 4网格groupHeader中显示分组值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文