I had created a 2 sample tree. I want to move the nodes from one tree to another and vice versa. But, the following rules should be satisfied.
- Only tree to tree drag-n-drop should be allowed.
- The child from one tree can be dragged to another tree under the same parent as in source tree, not under other parents.
- If we drag a child from one tree to another, and the another tree doesn’t have the parent of that particular node, then first the parent node should get created first and then the child should get added.
- If we again drag all other childs of the same parent from the source tree by dragging the parent node, then all the remaining childs get added under the same parent in another tree, even if we leave the drag over another parent node.
The node ids should be same on both trees.
So, i created each node manually and deleted each manually. It’s working fine, but i get the following error after deleting the Parent node, and again i drop the same parent from another tree.
getItem [The item 1 not operable. Seems you have non-unique|incorrect IDs in tree’s XML.]
I had attached the sample zip file. Please, run it and give me a solution
Steps To Run:
- open sample.html file in browser.
- Drag any one of the parent node from the left tree to another tree.
- Now drag the same parent from the right tree to left tree. You can get the error.
I don’t know what went wrong, whether my approach on this is correct.
dhtml.zip (1.8 KB)