dhtmlxGrid, setting rowspan using a json array

Hello,



I’m using dhtmlxSuite, 2.5. I’m using IE 8 in compatibility mode.



In my code for the grid I’m calling



var jsonData = getJsonArray();

myGrid.parse(jsonData,“json”);



Is there any way to set rowspan within each json cell while I’m dynamically building my json data? For example each cell could have:



{“value”:“0”, “rowspan”:“2”},…



I tried this and it ignored “rowspan”. I also tried the setRowspan() before the parse but the grid didn’t like it.



After I’ve performed the parse() I have to then iterate through my data again to apply:



myGrid.setRowspan(id,col,span);



Either I did something wrong or this is a bit inefficient. Thank you for your help.



-Doug



To set rowspan from xml/json you should add enableRowspan() method to the grid initialization:
mygrid.enableRowspan();
This method is available in PRO version only. To use it you should attach dhtmlxgrid_rowspan.js file to your page.
dhtmlx.com/dhxdocs/doku.php?id=d … ging_cells