[英]Trigger event when column header menu filter checkbox is checked/unchecked in Ext JS
I currently have no access to the column header menu xtype (since it is not exposed?), and for that reason I cannot add a listener to it in order to catch a checkchange event. 我目前无法访问列标题菜单xtype(因为它没有公开?),因此我不能添加一个监听器来捕获checkchange事件。
{
xtype: 'gridcolumn',
id: 'stagesEnteredQueue',
align: 'center',
dataIndex: 'enteredQueue',
text: 'Entered Queue',
format: 'd/m/Y',
filter: {
type: 'datetime',
format: 'd/m/Y',
},
renderer: function (val, metaData, record) {
val = Ext.Date.format(val, 'd/m/Y, H:i:s');
return val;
},
minWidth: 150,
flex: 1
}
How can I catch a check/uncheck event on the column header filter menu? 如何在列标题过滤器菜单上捕获检查/取消选中事件? The changes to the store filter it is automatically executing need to be changed due to business rules of my app.
由于我的应用程序的业务规则,需要更改对其自动执行的商店过滤器的更改。
There is a filterchange event in gridpanel. gridpanel中有一个filterchange事件。 You can read the documentation here: https://docs.sencha.com/extjs/6.5.3/classic/Ext.grid.Panel.html#event-filterchange
您可以在此处阅读文档: https : //docs.sencha.com/extjs/6.5.3/classic/Ext.grid.Panel.html#event-filterchange
If you are working in 6.5 then user below listeners
listeners:{
filteractivate:function( this, column, eOpts ) {
//TODO indetify by column
},
filterdeactivate:function( this, column, eOpts ) {
//TODO indetify by column
}
}
Note: Add a listener on the grid, not on the column.
Source https://docs.sencha.com/extjs/6.5.3/classic/src/Base.js-10.html#Ext.panel.Table-event-filteractivate
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.