我在一个网格中添加了headerCheckbox
,以获得Select/Deselect All的功能。还向checkcolumn
添加了checkchange
事件。当我手动选择/取消选择任何复选框时,该事件工作正常,但当我通过标题复选框进行选择时,该事件不触发。
因此,我的要求是,只要复选框中的选择发生变化,就应该触发事件。
这是我在Grid中的专栏:
{
xtype: 'checkcolumn',
dataIndex: 'xyz',
text: '',
headerCheckbox: true,
width: 25,
stopSelection: true,
sortable: false,
draggable: false,
resizable: false,
menuDisabled: true,
hideable: false
}
控制器中的事件:
control: {
'checkcolumn':{
checkchange: 'onCheckChange'
}
},
onCheckChange : function ( checkbox, rowIndex, checked, record, e, eOpts ) {
console.log(record);
}
1条答案
按热度按时间s2j5cfk01#
要捕获列标题检查更改事件,您需要侦听'headercheckchange':