[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Collapse]Site Navigation and Layout
   [Expand]Product Information
   [Expand]Floating Action Button
   [Expand]Form Layout
   [Expand]Navigation Bar
   [Expand]Page Control and Tab Control
    Panel Overview
   [Expand]Site Map Control
   [Expand]Tag Cloud Control
   [Expand]Title Index
     ASPxTreeView Overview
     [Expand]Binding to Data
      Expanding and Collapsing Nodes
      Animation Effect
      Check Box Support
    [Expand]Visual Elements
    [Expand]Member Tables
    [Expand]ASPxTreeView - Animated Images
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Check Box Support

ASPxTreeView allows end-users to check nodes. To enable this feature, set the ASPxTreeView.AllowCheckNodes property to true. You can disable the check box for a particular node by setting its TreeViewNode.AllowCheck property to false.

A node has two parameters that describe its check state:


The CheckState property is read only. It changes automatically dependent on the node and node's child nodes Checked property values. This behavior is by design, because an indeterminate node state means that the node has checked and unchecked children. If setting this state manually was allowed, it could break the check box logic.

The correspondence table of Checked and CheckState property values is presented below.

Appearance Checked CheckState Conditions (provided the CheckNodesRecursive is set to true)
true Checked The node has been checked or all its child nodes have been checked
false Unchecked The node has been unchecked or all its child nodes have been unchecked
false Indeterminate The node has checked and unchecked child nodes


Style Settings

ASPxTreeView allows you to change the appearance of all check boxes using the TreeViewStyles.NodeCheckBox property. The appearance of a particular check box can be customized via a node's TreeViewNode.CheckBoxStyle property. To customize an appearance of a focused check box use TreeViewStyles.NodeCheckBoxFocused property.


Server API

You can check/uncheck a node programmatically via the TreeViewNode.Checked property. When a node's Checked property value changes, the ASPxTreeView.CheckedChanged event occurs, allowing you to respond to this action. To obtain a node's check state, use the TreeViewNode.CheckState property.


Client-Side API

On the client, you can handle the ASPxClientTreeView.CheckedChanged event to respond to a change of a node's Checked property value. To obtain and set a node's Checked property value, use the ASPxClientTreeViewNode.GetChecked and ASPxClientTreeViewNode.SetChecked methods respectively. To obtain a node's check state, use the ASPxClientTreeViewNode.GetCheckState method.


Recursive Checking

You can allow end-users to employ recursive node checking. When the ASPxTreeView.CheckNodesRecursive property is set to true:

  • checking a parent node automatically checks all its children;
  • a parent node is automatically checked if all its child nodes are checked;
  • a parent node's check state is automatically set to indeterminate if it has checked and unchecked child nodes.

Take a look at this image to see how recursive node checking works.

Expanded Member Table

Expanded See Also

Is this topic helpful?​​​​​​​