ExtJS CheckboxSelectionModel clear header
A known issue with the ExtJS CheckboxSelectionModel is that when the grid is reloaded (e.g. an AJAX command is ran to delete selected rows) the header checkbox remains checked.
A solution to the issue is to override the clearSelections function to force the header to be unchecked.
Ext.override(Ext.grid.CheckboxSelectionModel, {
clearSelections : Ext.grid.CheckboxSelectionModel.
prototype.clearSelections.createSequence(function(fast){
var hdCheckbox = this.grid.getEl().select(‘.x-grid3-hd-checker-on’);
if(hdCheckbox) hdCheckbox.removeClass(‘x-grid3-hd-checker-on’);
})
});