我在checkboxselectionmodel
中使用EXTJS 3.4
。如何确定何时选中标题复选框?
示例:
if (header checkbox is checked) {
//do this..
} else if (individual child checkboxes are checked) {
//do something else
}
答案 0 :(得分:0)
为我的查询发布解决方案可能会帮助其他人:)
var view = Ext.getCmp('<<Grid ID >>').getView();
var isChecked = false;
var chkdiv = Ext.fly(view.innerHd).child(".x-grid3-hd-checker-on");
if (!(chkdiv == null)) {
isChecked = chkdiv.hasClass('x-grid3-hd-checker-on');
}
if (isChecked) {
console.log('Header Checked!!!');
}
else {
console.log('Child Checked!!!');
}