I want to have the ability to drag nodes to sub-parents, but I don't want to have the ability to drag nodes to other parents. For instance,
Parent A
- Node 1
- Sub-Parent A
Parent B
In the example above, I want to be able to drag Node 1 to Sub-Parent A and back to Parent A, but not to Parent B.
How can I do this? I have tried using the onDrop event but I do not know how to tell which node was moved to which parent. If it is an invalid parent, I want to be able to cancel that event.
DataSources are not used.
Parent A
- Node 1
- Sub-Parent A
Parent B
In the example above, I want to be able to drag Node 1 to Sub-Parent A and back to Parent A, but not to Parent B.
How can I do this? I have tried using the onDrop event but I do not know how to tell which node was moved to which parent. If it is an invalid parent, I want to be able to cancel that event.
DataSources are not used.
Comment