PDA

View Full Version : deselectRecords



botgv
20 Jun 2008, 8:51 AM
Hi

Just for those who need to deselect rows from an array of records as the Ext.grid.RowSelectionModel.selectRecords method does.

Nothing genuis almost a copy/paste

but can be use full for beginners


Ext.override(Ext.grid.RowSelectionModel, {
/**
* deselect records.
* @param {Array} records The records to select
*/
deselectRecords : function(records){
var ds = this.grid.store;
for(var i = 0, len = records.length; i < len; i++){
this.deselectRow(ds.indexOf(records[i]));
}
}
});