Problem: The grid header check status does not reflect the real state of checked items in the grid. This is not a big deal but is very annoying.Solution attached solves the issue. Enjoy

Code:
Ext.ux.CheckboxSelectionModel = Ext.extend(Ext.grid.CheckboxSelectionModel,{
	constructor:function(config){
		Ext.ux.CheckboxSelectionModel.superclass.constructor.call(this,config);
		this.on("rowselect",this.onRowSelectUnselect,this);
		this.on("rowdeselect",this.onRowSelectUnselect,this);
	},
	onRowSelectUnselect:function(){
		//fire only the last event
		window.clearTimeout(this.__onRowSelectUnselectTimer);		
		this.__onRowSelectUnselectTimer = window.setTimeout(function(){
			var el = this.grid.getView().innerHd;		
			var sels = this.getSelections().length;
			var total = Math.max(this.grid.store.data.length,this.grid.store.getTotalCount());
			var hdinners = Ext.fly(el).query("div.x-grid3-hd-checker");
			var toCheck = total===sels;
			for(var i=0;i<hdinners.length;i++){
				var item = hdinners[i];
				if(Ext.fly(item).hasClass("x-grid3-hd-inner")){
					if(toCheck){
						Ext.fly(item).addClass('x-grid3-hd-checker-on');			                	                
		            }else{
		            	Ext.fly(item).removeClass('x-grid3-hd-checker-on');	
		            }
				}
			}			
		}.createDelegate(this),0);
	}
});