Hello,
I have a grid with Ext.selection.CheckboxModel.
Code:
Ext.define('MyGrid',
{
extend: 'Ext.grid.Panel',
store: Ext.create('MyStore'),
columns: [{
header: 'Code',
dataIndex: 'Code'
},{
header: 'Name',
dataIndex: 'Name'
}],
initComponent: function(){
this.selModel = Ext.create("Ext.selection.CheckboxModel",{
checkOnly : true,
listeners: {
select: function(row, record, index, eOpts){
myBusinessService.select(record);
},
deselect: function(row, record, index, eOpts){
myBusinessService.deselect(record);
}
}
});
this.callParent(arguments);
}
});
I have to make some actions when user selects or deselects some record in this grid. In some cases the store for this grid is reloading. In ExtJS 4.1.1 before store is loaded there happens deselection of all selected item that makes deselect event for Checkboxmodel fired. But I just want to process user selection\deselection. How can I distinguish deselection via store reloading and user deselection? Thanks!