How to move node to other parent by dragging on tree

Hello,

I want to change node’s parent by dragging.on tree

For example, when I drag item14 to item12, item14 will be placed under the item12. (It works like directory browser.)

Is there an example or link I can refer to?

Thanks

Yes, the Org Chart Editor sample does exactly that: Org Chart Editor

The functionality is implemented in the Node.mouseDrop event handler. Note the mayWorkFor predicate.

There is also feedback during dragging that is implemented in the Node.mouseDragEnter and .mouseDragLeave event handlers. But you may want to implement highlighting differently than that sample, since that depends on the design of the nodes.