We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Programmatically move nodes from One tree to another

there is a method to move an entire subtree from one tree to another, like doing a drag and drop operation,, but done programmatically?

    Thanks in advance

    Andea Perazzolo

3 Replies

SS Saranya Sivakumar Syncfusion Team March 17, 2015 09:37 AM UTC

Hi Andrea,

Sorry for the inconvenience caused.

We would like to let you know that, currently we don’t have a public method to move an entire sub tree from one tree to another tree without drag and drop. But we can achieve it programmatically and we have prepared a custom sample based on your requirement. We have attached the custom sample in the following location.


In this sample we have written the code in a button click event. In the button click, we have cut and paste the selected node by triggering “keydown” event and make control key as true. Then we have used the key code “88” to cut and “86” to paste the node. Then assign the value for “_cutCopyNodeText”. Finally trigger the event.

Please let us know if you have further queries.



AP Andrea Perazzolo March 17, 2015 05:56 PM UTC

Thanks for the sample.
I used it on my project and it works.
Just one question:
after moving the nodes, they cannot be moved with drag & drop operation.
There is a way to maintain this behaviour after the Cut & Paste operation?

   Thanks in advance

    Andrea Perazzolo

SS Saranya Sivakumar Syncfusion Team March 18, 2015 01:05 PM UTC

Hi Andrea,

We were able to reproduce the problem and we considered this issue “Drag and drop doesn’t work for the pasted node in Treeview” as bug, also have logged a report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates.


Please let me know if you have any questions.



Live Chat Icon For mobile
Up arrow icon