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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Programmatically move nodes from One tree to another

Thread ID:





118491 Mar 12,2015 03:49 PM UTC Mar 18,2015 01:05 PM UTC ASP.NET MVC 3
Tags: TreeView
Andrea Perazzolo
Asked On March 12, 2015 03:49 PM UTC

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

Saranya Sivakumar [Syncfusion]
Replied On 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.



Andrea Perazzolo
Replied On 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

Saranya Sivakumar [Syncfusion]
Replied On 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.




This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon