# Using Checkboxes

Enable the check boxes by setting the **CheckBoxes** property to *true*. By default all nodes display check boxes when the **CheckBoxes** property is *true*. To suppress showing a checkbox next to a particular RadTreeNode set the node **CheckType** property to *None*. To check a node programmatically, use the **Checked** or **CheckState** properties of RadTreeNode. When the user clicks a checkbox the **NodeCheckChanged** event fires passing a RadTreeViewEventArgs object that contains the checked Node.

## Tri-State CheckBoxes

Tri-state check boxes in addition to checked and unchecked states also have a "indeterminate" state. To enable this feature set the **TriStateMode** property to *true*. The screen shot below shows that "Node1" is in **Indeterminate** state to indicate that its children are not all checked.

![WinForms RadTreeView Tri-State CheckBoxes](https://www.telerik.com/products/winforms/documentation/assets/0d30fc968b8ca69bf34ccc6a69c42ef9/treeview-working-with-nodes-using-checkboxes001.png)

> note When **TriStateMode** is set to true, the **CheckBoxes** property is also set to true automatically.

To programmatically set the state when **TriStateMode** is true assign the **CheckState** property one of the **ToggleState** enumeration values.

![WinForms RadTreeView ToggleState](https://www.telerik.com/products/winforms/documentation/assets/e91a0dafcfd8f0829cf7b55f6a7e592f/treeview-working-with-nodes-using-checkboxes002.png)

## Option Tree Support

**RadTreeView** the supports option trees that allows radio buttons and check boxes to be mixed in order to form an arbitrary complex option tree. The only limitation is that all sibling nodes must have either check boxes or radio buttons. Check boxes and radio buttons can be mixed in a single **RadTreeNodeCollection**. The **RadTreeNode** property that control the type of option element to be shown (check box or radio button) is **CheckType:**

![WinForms RadTreeView Option Tree Support](https://www.telerik.com/products/winforms/documentation/assets/f1536013ad477324734b25f8b82374a8/treeview-working-with-nodes-using-checkboxes003.png)

```C#
RadTreeNode Node1 = new RadTreeNode("Node1");
Node1.Expanded = true;
Node1.CheckType = CheckType.RadioButton;
RadTreeNode Node2 = new RadTreeNode("Node2");
RadTreeNode Node3 = new RadTreeNode("Node3");
RadTreeNode Node4 = new RadTreeNode("Node4");
radTreeView1.Nodes.Add(Node1);
radTreeView1.Nodes.Add(Node2);
Node1.Nodes.Add(Node3);
Node1.Nodes.Add(Node4);
```

```VB.NET
Dim Node1 As New RadTreeNode("Node1")
Node1.Expanded = True
Node1.CheckType = ChildListType.OptionList
Dim Node2 As New RadTreeNode("Node2")
Dim Node3 As New RadTreeNode("Node3")
Dim Node4 As New RadTreeNode("Node4")
RadTreeView1.Nodes.Add(Node1)
RadTreeView1.Nodes.Add(Node2)
Node1.Nodes.Add(Node3)
Node1.Nodes.Add(Node4)
```

## See Also

* [Adding and Removing Nodes](https://www.telerik.com/products/winforms/documentation/controls/treeview/working-with-nodes/adding-and-removing-nodes)

* [Bring a Node into View](https://www.telerik.com/products/winforms/documentation/controls/treeview/working-with-nodes/bring-a-node-into-view)

* [Custom Filtering](https://www.telerik.com/products/winforms/documentation/controls/treeview/working-with-nodes/custom-filtering)

* [Custom Nodes](https://www.telerik.com/products/winforms/documentation/controls/treeview/working-with-nodes/custom-nodes)

* [Custom Sorting](https://www.telerik.com/products/winforms/documentation/controls/treeview/working-with-nodes/custom-sorting)

* [Events](https://www.telerik.com/products/winforms/documentation/controls/treeview/working-with-nodes/events)
