Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by zeckon on Jan 18, 2008 02:35
open dhtmlx forum
setHeader Parameters

in the documentation it says

setHeader(hdrStr,splitSign,styles)
set header label and default params for new headers
styles - array of header styles

in my code:
var headerStyles=new Array("gridheader1,gridheader2");
...
testgrid.setHeader("header1,header2","#cspan",headerStyles);

in my css file:
.gridheader1 {background-color: red;}

but it doesn't work. (header bg is not red.)

any suggestions?
Answer posted by Support on Jan 18, 2008 05:49
Command expect actual css code, not the class name

var headerStyles=["background-color: red;","background-color: green;"];
...
testgrid.setHeader("header1,header2","#cspan",headerStyles);
Answer posted on Jan 18, 2008 06:12
is there any method to set class name for headers?
Answer posted by Support on Jan 18, 2008 06:37
There is no  such API method, but after grid.init , when HTML structure already created you can set id directly through DOM

    grid.hdr.rows[1].cell[3].className="my_css_class";
Answer posted on Jan 18, 2008 07:57

not cell[i] but cells[i] worked, thanks.