Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Joshua Holmes on Jul 16, 2007 20:36
open dhtmlx forum
Header Colors

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!
Answer posted on Jul 19, 2007 10:20

You can use 3rd argument of setHeader(hdrStr,splitSign,styles) to define style for each header cell. See details in API documentation.

 

 

Answer posted by Scott on Jul 23, 2007 18:02
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.
Answer posted by Inga (Support) on Dec 02, 2014 16:35

Not much can be said in addition to the reply above, but you also can check java chart and asp.net scheduler free and find out what we have probably missed in our explanation.