我已经在Extjs 3.4中实现了网格过滤器,但现在我正在迁移到extjs 4.1。 任何人都可以告诉我如何在extjs 4.1中实现网格过滤器吗?如何添加过滤器标题到每个网格列extjs 4.1
(作为一个新的用户,我无法上传图片显示一个例子)
我已经在Extjs 3.4中实现了网格过滤器,但现在我正在迁移到extjs 4.1。 任何人都可以告诉我如何在extjs 4.1中实现网格过滤器吗?如何添加过滤器标题到每个网格列extjs 4.1
(作为一个新的用户,我无法上传图片显示一个例子)
最好的方法是定义一个列组件。
Ext.define('Ext.ux.grid.MyColumn',{
extend: 'Ext.grid.column.Column',
alias: 'widget.mycolumn',
childEls: [
'headerEl', 'titleEl', 'filterEl', 'triggerEl', 'headerTextEl', 'filterTextEl'
],
renderTpl:
'change it , and make your own TPL',
initComponent: function() {
// change or declare new data if you want.
// me.callParent(arguments);
// I have modified lot. so, I skip initComponent of Ext.grid.column.column
me.superclass.superclass.initComponent.call(this); // directly call parents parent class.
}
});
USAGE :
columns: [
{
xtype: 'mycolumn',
itemId: 'sfsfsfsfsf', text: 'My filter column'
}
]
请参考以下链接。
http://www.sencha.com/forum/showthread.php?150918-Grid-Header-Filters
第二个选项菜单中过滤器,这是ExtJS的4.1实例可用。
http://docs.sencha.com/extjs/4.1.3/#!/example/grid-filtering/grid-filter-local.html
第三个选项是过滤行。
http://www.sencha.com/forum/showthread.php?128154-FilterRow-for-Ext-JS-4-Grids
其中的一个环节将引导您正确的道路。
问候。
非常感谢您的回复,但我还是不知道答案。 – user2135671 2013-03-28 15:18:16
请勿使用答案与海报进行交流。使用*评论* .. – Rob 2013-03-28 15:34:23
好吧罗布。下次我会照顾。谢谢。 – 2013-04-03 10:41:24