Extjs 3.4 checkchange监听器不在Checkcolumn上工作

pm1*_*m13 5 checkbox grid extjs extjs3

我的checkColumn的checkchange监听器无法正常工作.任何想法为什么不呢?

var checked = new Ext.grid.CheckColumn({
  header: 'Test',
  dataIndex: 'condition',
  renderer: function(v,p,record){
        var content = record.data['info'];      
        if(content == 'True'){
              p.css += ' x-grid3-check-col-td'; 
            return '<div class="x-grid3-check-col'+(v?'-on':'')+' x-grid3-cc-'+this.id+'"> </div>';
        }

  },    
  listeners:{
        checkchange: function(column, recordIndex, checked){
              alert("checked");
        }

  }

});
Run Code Online (Sandbox Code Playgroud)

小智 0

在ExtJS 3中,checkcolumn插件实际上并没有使用ExtJS的复选框组件,因此复选框事件不可用。checkcolumn 只是一个扩展的网格列,它添加了一个自定义渲染器来将单元格设置为复选框的样式。

默认情况下,您唯一可以监听的事件是 Ext.grid.Column 的事件(clickcontextmenudblclickmousedown)。

对类似问题的回答 显示了如何覆盖 CheckColumn 并添加 beforecheckchange 和 checkchange 事件。