PDA

View Full Version : CheckboxSelectionModel Header Select All Issue



nagavasantha
29 Apr 2012, 10:20 PM
I have a grid with CheckBoxSelectionModel. Selecting the header checkbox checks all the records and deselecting the checkbox unchecks all the records, of course which is the behavior.

I have a tree also in the same panel to the left side, and when I traverse the nodes in the tree, the grid gets updated with the new set of records.
But, the checkbox selection in the column header still remains as checked and not able to uncheck the selection in the header. Needs a page refresh to get it unchecked.

Any help will be appreciated.
Thanks!

scottmartin
30 Apr 2012, 2:21 PM
This as been reported: EXTJSIV-6075

Regards,
Scott.

smasam
1 May 2012, 7:42 PM
All,

I faced the same issue. I used below override to overcome the issue.

Ext.override(Ext.selection.CheckboxModel, {

bindComponent: function(view) {
var me = this;
me.callOverridden(arguments);
if (!me.hasLockedHeader() || view.headerCt.lockedCt) {
me.mon(view.ownerCt.getStore(), 'load', me.deselectHeaderCheckbox, me);
}
},


deselectHeaderCheckbox: function() {
this.toggleUiHeader(false);
}
});


Regards
Srinivas Masam