此方式适用于在grid中绑定selModel : Ext.create('Ext.selection.CheckboxModel')
取消指定选中
// 参数为记录的索引
xxxGrid.getSelectionModel().deselect(0);
取消所有选中
xxxGrid.getSelectionModel().deselectAll();
API:
Deselects a record instance by record instance or index.
Parameters
- records : Ext.data.Model[]/Number
An array of records or an index
- suppressEvent : Boolean (optional)
True to not fire a deselect event
Defaults to:
false
Deselects all records in the view.
Parameters
- suppressEvent : Boolean (optional)
True to suppress any deselect events