Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vikas on Sep 18, 2009 06:55
open dhtmlx forum
Colspan and rowspan with group by function

I have a problem with group by functionality of Dhtmlxgrid.

If I use following lines in loadXML event

mygrid.setRowspan(1,2,3);
mygrid.setColspan(3,3,2);

then they works fine with group by.

But If I use colspan on XML data then it creates a problem in displaying columns.

For e.g.

I have even rows with 5 columns,
And odd rows with 4 columns.

I use the following line on server side where I generate XML data:

<cell colspan=""2"">some data</cell>

you can see the problem in the following image:
http://img10.imageshack.us/img10/4116/69174371.jpg

In that I use product cost for grouping
I use colspan for Product one time for length 2 for alternate rows.

can you help me out?
Answer posted on Sep 23, 2009 04:16
If you are setting colspan from xml, you should add enableColSpan(true) to the grid initialization:

mygrid.enableColSpan(true);
 mygrid.init();