Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jun 25, 2007 15:23
open dhtmlx forum
If i create a child of a parent of Treegrid type and make it a parent using " mygrid.moveRowTo(mygrid.getSelectedId(),0,"move","child");" command the child goes right to the top of the grid.

If i create a child of a parent of Treegrid type and make it a parent using " mygrid.moveRowTo(mygrid.getSelectedId(),0,"move","child");" command the child goes right to the top of the grid i.e to 0 id . Is it possible to make the child a parent and still keep it in the same location i.e the row. If so May i know what is the command for doing the same

To be more clear

Suppose row5 has a parent and i create a child for it on row 6 (which actually happens by default). Now i need to make the child on row 6 such that it is no more a child to the parent of row 5 and the child still remains at row 6 . Can you let me know the command for doing the same.
Answer posted on Jun 26, 2007 14:46
There is no such API to move row in special position, the moveRowTo simulate d-n-d operation and limited to its variants

Suppose row5 has a parent and i create a child for it on row 6 (which actually happens by default). Now i need to make the child on row 6 such that it is no more a child to the parent of row 5 and the child still remains at row 6 . Can you let me know the command for doing the same.
You can use something similar to next
    mygrid.moveRowTo('row6','row5',"move","sibling");

The command will move row5 as sibling of row6, so it will be on same level as row6 and exactly next to it.
Answer posted by sematik (Support) on Nov 29, 2014 02:13

To find more precise comments upon this issue, we can offer you read about tree javascript and virtual office.