PDA

View Full Version : how to replace column header css



aj3423
12 May 2009, 2:54 AM
a grid with a column name: 'col', id: 'colId'
i want to change it's css , in ext2.2, I use

grid.colModel.config[0].grid.body.addClass('x-grid3-hd-checker-on');

in ext3, the grid.colModel.config[0].grid is undefined.
so how can I change it?
Thanks in advance.

Condor
12 May 2009, 3:17 AM
Your code should also not work in Ext 2 (are you using some kind of user extension ?).

I recommend:

Ext.fly(grid.getView().getHeaderCell(0)).addClass('x-grid3-hd-checker-on');

aj3423
12 May 2009, 6:15 AM
That's it~ I'm trying to make a CheckColumn extension with a checkbox on the header.
THANKS Condor!

Condor
12 May 2009, 6:49 AM
Are you aware of the SmartCheckboxSelectionModel user extension (http://www.extjs.com/forum/showthread.php?t=37588)?

aj3423
12 May 2009, 8:05 AM
yes, but I dont want the line be highlighted when it is checked, and I dont know how to modify the SmartCheckboxSelectionModel to fit that, so I just write one extension:)