Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Nov 28, 2007 02:50
open dhtmlx forum
multiple line header

Hello!

I need to do a grid, where i have a header with 7 entries. The sixth one of these entries should have 5 additional headers in a second line. So the sixth entry should span 5 columns.

Ok, i dont know why, but i cant implement it correctly.

I thought it works like this:

mygrid.setHeader("x1,x2,x3,x4,x5,x6,x7");
mygrid.setInitWidths("30,30,100,60,250,500,65");
.
.
.
.mygrid.attachHeader("#rspan,#rspan,#rspan,#rspan,#rspan,y1,y2,y3,y4,y5,#rspan");

Its obvious, that this isnt correct. Could you please show me how to use it correctly? Thank you very much!!
Answer posted by Support on Nov 28, 2007 03:38
The correct structure will be similar to next
    mygrid.setHeader("x1,x2,x3,x4,x5,x6,#cspan,#cspan,#cspan,#cspan,x7")
    mygrid.attachHeader("#rspan,#rspan,#rspan,#rspan,#rspan,y1,y2,y3,y4,y5,#rspan");


so the count of values in both command are equal, as result you have a colspan in first row , and 5 columns on it place in second row.