View Full Version : column header: set custom background color

4 Nov 2009, 2:58 AM

i want to set the column header background color for a special grid (not for all grids). i recognized the "x-grid3-header" style. but if i overwrite this style in a custom css file, all styles are set in this color.

so how can i set the style for just a column header i want.

i found the line "cf.setStyleName(row, col, 'x-grid3-header x-grid3-hd x-grid3-cell')" in "ColumnHeader.java" in the method "refresh()" where the style is set. but that's hard-coded in the class file.


28 Jun 2012, 3:20 PM
I too had this trouble, and surprisingly enough not many people seem to be trying to do this, thus no solutions are really out there to find. However after this post there will be one :)


do not put the . of the filename, i.e. if youre CSS style is named .x-header-red, the parameter you will enter is "x-header-red"

Took me a while to find, but in the API for ColumnConfig it states that setColumnStyleName() applies the style to the header of the column, not the entire column as the method name would imply.