I have looked every where but cannot find information on header colors…
Other then using CSS, can I assign different header colors?
For instance, I would like (on the same grid) 2 column headers to be gray and the last two to be say green.
Is there a way to do this in the JavaScript when the object is initialized?
Thanks!
You can use 3rd argument of setHeader(hdrStr,splitSign,styles) to define style for each header cell. See details in API documentation.
To change header colors after the grid has been created, I use this code to get the header element (i.e. TD) and then set the background color directly:
grid.getHeaderCol(colIndex).style.background = ‘yellow’;
Note: if you are using splits, or if you have more than 1 header, you will need to add some other code.