RadTreeView for ASP.NET

Using the Drag and Drop Functionality Send comments on this topic.
See Also
Using the Drag and Drop Functionality > Using the Drag and Drop Functionality

Glossary Item Box

Telerik RadTreeView supports "drag and drop" functionality for treenodes. To enable this mode you need to mark the instance of RadTreeView with the DragAndDrop attribute:

ASP.NET">
  Copy Code
DragAndDrop="True"

You can also select multiple treenodes using the MultipleSelect attribute:

ASP.NET">
  Copy Code
MultipleSelect="True"
DragAndDrop="True"

Then simply select a few nodes by holding down the Ctrl key and drop them onto another TreeNode of the same treeview, a  TreeNode of another treeview, or any HTML element on the page.


You can use Telerik RadTreeView multiple select drag & drop feature with a complex structured treeview within a limited size for the treeview. Use the Ctrl+Left mouse button multiple selection method. Then use the middle scroll mouse button to scroll to the needed position and drop there the selected nodes.

 

When RadTreeView detects a valid drag-and-drop operation (the selected node is dropped onto another node) it generates a NodeDrop server-side event. The event is set to the source treeview - the one from which the node is being dragged. The event handler for NodeDrop can then perform specific action, by fetching both the source and destination drag/drop nodes. In this event you can use the RadTreeViewInstance.GetSelectedNodes() method to get a collection of all dragged nodes and the RadTreeNodeEventArgs.Node 

See a live example of Drag and Drop inside a TreeView, between TreeViews and between TreeView and an HTML element at:
Drag And Drop

See Also