TreeView for ASP.NET WebForms
Creating Node Check Boxes
Task-Based Help > Creating and Configuring Check Box Nodes > Creating Node Check Boxes

To create a C1TreeView filled with check box nodes, simply set the C1TreeView's ShowCheckBoxes property to True and all of the nodes contained within the control will adopt check boxes.

In Design View

Complete the following steps:

  1. Click the smart tag to open the C1TreeView Tasks menu. Select Edit TreeView.

    The C1TreeView Designer Form dialog box opens.

  2. In the designer treeview, select the C1TreeView control (C1TreeView1 by default).
  3. Navigate to the properties grid, locate the ShowCheckBoxes property, and set it to True.

In Source View

Add ShowCheckBoxes = True to the <cc1:C1TreeView> tag so that the markup resembles the following:


<cc1:C1TreeView ID="C1TreeView1" runat="server" ShowCheckBoxes="True">

In Code

Add the following code snippet to the Page_Load event:

To write the code in Visual Basic:

  C1TreeView1.ShowCheckBoxes="True"

To write the code in C#:

C1TreeView1.ShowCheckBoxes="True";
See Also