TreeView for ASP.NET WebForms
Step 2 of 3: Creating a TreeView Using the Designer
Quick Start > Step 2 of 3: Creating a TreeView Using the Designer

This step will show you how to create root and child nodes, apply a visual style, and display check boxes next to the nodes.

  1. Select the C1TreeView control and click on the smart tag to open its Tasks menu.
  2. Select Edit TreeView from C1TreeView Tasks menu to open the designer.

  3. Right-click on the C1TreeView item and select Add Child | C1TreeView Node to add the root to the C1TreeView control. Set the C1TreeViewNode1's Text property to "Book List".

  4. Right-click on Book List and select Add Child to create a child for the root node. Repeat this two more times. Three child nodes will exist under the Book List.

  5. Select the first node under the Book List and set its Text property to "Language Books".
  6. Select the second node under the Book List and set its Text property to "Security Books".
  7. Select the third node under the Book List and set its Text property to "Classic Books".
  8. Right-click on the Classic Books node and select Add Child to create a child for the Classic Books node. Repeat this to create two C1TreeViewNodes under the Classic Books node.
  9. Select the first node under the Classic Books node and set its Text property to "The Great Gatsby".
  10. Select the second node under the Classic Books node and set its Text property to "Catch-22".
  11. Right-click on Book List and select Add Child to add to add a child node.

In this step, you nodes and child nodes to the C1TreeView control. In the next step, you'll run the project and see the results of this quick start.

See Also