Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stevo on Mar 25, 2008 16:37
open dhtmlx forum
copy all children (subset) from one TreeGrid to another

Hi,

What is the best way to copy only the children of the selected row from the source treegrid to an empty treegrid? Thanks in advance.
Answer posted by Support on Mar 26, 2008 04:00
Default approach with usage of grid.moveRowTo is the simplest way

var ids=mygrid.getSubItems(id).split(",")
for (var i=0; i<ids.length; i++)
    mygrid.moveRowTo(ids[i],0,"copy","child",mygrid,targetGrid);