[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Collapse]Grid View Data Layout
    [Expand]Columns and Card Fields
    [Expand]Rows and Cards
      Nodes Overview
      Iterating Through Nodes
      Expanding and Collapsing Nodes
      TreeListView Sorting Specifics
      Obtaining Nodes
      Checking Nodes
     Data Cells
     Best Fit
     Compact Mode
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Filtering and Searching
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus and Navigation
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Checking Nodes

Nodes can display check boxes that allow an end-user to check/uncheck individual nodes. Embedded check boxes can be bound to a Boolean field in the grid's data source via the TreeListView.CheckBoxFieldName property.

Enable the TreeListView.ShowCheckboxes option to display check boxes embedded into nodes.

To check all nodes in code, use the TreeListView.CheckAllNodes method. To uncheck all nodes, use the TreeListView.UncheckAllNodes method. Each time a node's check state is changed, the TreeList View fires the TreeListView.NodeCheckStateChanged event. Use its TreeListNode.IsChecked property to identify whether a node is checked.

Recursive Node Checking

If the TreeListView.AllowRecursiveNodeChecking property is set to true, selecting a parent node automatically selects all its children. Vice versa, selecting all child nodes automatically selects its parent node(s). When an end-user unchecks a child node, the parent node is set to undetermined check state.

When the TreeListView.AllowRecursiveNodeChecking option is enabled, the TreeListRowData.IsChecked property returns the following values:

  • true - if all child nodes are checked
  • false - if none of child nodes are checked
  • null - if a current node contains both checked and unchecked children.

Note that in this case, if you use the TreeListView.CheckBoxFieldName property to update a corresponding property in your data items, this property should be of the Nullable<Boolean> data type.

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