TreeView for ASP.NET WebForms
Drag-and-drop Behaviors Within One Tree Structure
Task-Based Help > Setting C1TreeView Properties to Allow Drag-and-Drop Behaviors > Drag-and-drop Behaviors Within One Tree Structure

This topic will walk you through setting C1TreeView properties to allow drag-and-drop behaviors within one tree structure.

In Design View

  1. Click the C1TreeView smart tag  to open the C1TreeView Tasks Menu.
  2. Click Edit TreeView to open the C1TreeView Designer Form.

  3. Locate the AllowDrag and AllowDrop properties in the Designer Form Properties Window and use the drop-down menus to set both properties to "true".
  4. Press F5 to run your program. Note that you are now able to rearrange the nodes.

In Source View

Add the following markup to the first set of <cc1:C1TreeView> tags.

Markup
Copy Code
AllowDrag="True"
AllowDrop="True"

The <cc1:C1TreeView> tags should resemble the following sample.

Sample
Copy Code
<cc1:C1TreeView ID="C1TreeView1" runat="server" AllowDrag="True"
       AllowDrop="True">

Press F5 to run your program. Note that you are now able to rearrange the nodes.

See Also