How to set column headers background color
The global setting can be adjusted in dhtmlxgrid.css
div.gridbox table.hdr td {
…
background-Color:#D4D0C8;
Please beware that such value can be redefined by skin specific styles
If you need to set it directly from js code, it can be done as
grid.setHeader(“A,B,C”,null,[“background-color:red”,“background-color:blue”,“background-color:green”])
The third parameter is an array of styles, which will be assigned to header cells.
Hi,
Thanks for the reply. It si working fine. But I need to set the background in tag. My syntax is like this:
Response.Write “<column width=”“100"” type="“ro”" align="“left”" color="“white”" sort="“na”">" & _
“<![CDATA[" & sData & "]]>”
Here how can I set column headers background color. Please Suggest.
You can place some html element with backdround in the the header cell. For example:
<![CDATA[
Hi,
Thanks for the reply. I have tried this syntax in several ways:
Response.Write “<column width=”“100"” type="“ro”" align="“left”" color="“white”" rowspan="" " & RowSpan & " “” colspan="" " &ColSpan &" “”>""<![CDATA[
Response.Write “<column width=”“100"” type="“ro”" align="“left”" color="“white”" rowspan="" " & RowSpan & " “” colspan="" " &ColSpan &" “”>""<![CDATA[
Column headers are displayed but only the values came with background color not the whole column header. Please suggest how to set background color for whole column header.