View Full Version : How do you disable column header in Ext.grid.CheckboxColumn?

14 Feb 2012, 10:28 AM
We're using Ext.grid.CheckboxColumn to create a column of checkboxes. Depending on the data, in certain situations, we want the column headers (or more exactly, the 'Select All' checkboxes) to be disabled. Does anyone know how to do this?

14 Feb 2012, 10:52 AM
Try setting header to false to see how far that gets you. It shouldn't render anything and react to clicks.

14 Feb 2012, 1:06 PM
Thanks, that helps. I was able to access the header, but I just want to disable it. IOW, it should still be visible on the screen, but looked grayed out.

Anyway, I am able to access the header, but it turns out that the header isn't really an HTML checkbox. It's actually a div with its style set to x-grid3-check-col:

'<div style="text-align:center">' + headerLabel + '</div><div style="float:left">Select All </div><div class="x-grid3-check-col x-grid3-check-col" style="background-position:right center">&nbsp;</div>'

The sytle is using GIF files to make it look like a checkbox:

.x-grid3-check-col { background-image:url(../images/default/menu/unchecked.gif);}.x-grid3-check-col-on { background-image:url(../images/default/menu/checked.gif);}

I'm not sure what to do next. Is there a way to get this so it's still visible on the screen but is grayed out?