Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by John Cottam on Oct 29, 2009 15:37
open dhtmlx forum
Expand and Collapse All subgrids

I have a table where each row has a sub-table. I would like to put a button next to the table to expand and collapse all subgrids. Can this be done?

John
Answer posted by dhxSupport on Oct 30, 2009 02:53
To open one sub grid row you can use:
mygrid.cellByInd(rowId,cellIndex).open();
To open all sub grids you should iterate through all rows:
mygrid.forEachRow(function(id){
   mygrid.cellByInd(id,cellIndex).open();
});