var sm = new Ext.grid.CheckboxSelectionModel();
sm.handleMouseDown = Ext.emptyFn;//不响应MouseDown事件
sm.on('rowselect',function(sm_,rowIndex,record){//行选中的时候
}, this);
sm.on('rowdeselect',function(sm_,rowIndex,record){//行未选中的时候
}, this);
new Ext.grid.CheckboxSelectionModel({
listeners:{
'rowselect':function(sm,rowIndex,record){
console.log('rowselect',rowIndex)
},
'rowdeselect':function(sm,rowIndex,record){
console.log('rowdeselect',rowIndex)
},
'selectionchange':function(sm){
console.log('selectionchange',sm.getSelections().length);
}
}