Tree Grid Changing Parent

Is there a way to move a node to another node anywhere in the tree?



IE:



-Parent1

–c1

–c2

-Parent2

–c3



Either move c2 underneath c1 or move c2 to parent2. I would like the ability to do both.



Thank You,

-Jason

TreeGrid can use moveRowTo method, to move row at any position in grid

>>move c2 underneath c1

    grid.moveRowTo(“c2”,“c1”,“move”,“child”)

>>move c2 to parent2

    grid.moveRowTo(“c2”,“parent2”,“move”,“child”)

I notice that in terms of the dataprocessor it deletes the row and re-adds it under the new parent. Is there a way to just “move” it? Or am I going to have to do some special data processing to simulate this? There is a bunch of extra data with my grid items that does not display in the grid that I don’t want to lose because of a delete/insert.


The move operation in treegrid is really a combination of add|delete operation. But grid preserves all defined values and userdata.
If you need version of datapocessor which will treat row d-n-d as “update” operation - please contact us directly at support@dhtmlx.com - we will provide an updated js file ( it will not change the logic in grid, just the way how information synced with backend )