[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
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Collapse]Grid View Data Layout
    [Expand]Columns and Card Fields
    [Expand]Bands
    [Expand]Rows and Cards
    [Collapse]Nodes
      Nodes Overview
      Iterate Through Nodes
      Expand and Collapse Nodes
      Obtain Nodes
      Check Nodes
      Sort Nodes
      Filter Nodes
      Move Nodes
     Data Cells
     Best Fit
     Compact Mode
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus, Navigation, Selection
   [Expand]Drag-and-Drop
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [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
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Check Nodes

You can embed check boxes into nodes and allow an end user to check/uncheck them:

Tip

Demo: Node Check Boxes

Requires installation of WPF Subscription. Download

Expanded To Embed Check Boxes into Nodes

  1. Set the TreeListView.ShowCheckboxes property to true to display check boxes embedded into nodes.

  2. Set values of check boxes. Do one of the following:

The code sample below shows how to display check boxes and bind them to the OnVacation field:

Note

The TreeListView does not post the focused row's check box value until you focus another row. To make the TreeListView post check box values immediately, set the TreeListView.ImmediateUpdateCheckBoxState property to true.

Expanded Check Nodes in Code

Use the following members to check/uncheck nodes in code:

Method Description
TreeListView.CheckAllNodes Checks all nodes.
TreeListView.UncheckAllNodes Unchecks all nodes.
TreeListNode.IsChecked Checks/unchecks the node.

When a node's check state is changed, the TreeListView raises the TreeListView.NodeCheckStateChanged event. Use the TreeListNode.IsChecked property to identify whether a node is checked.

Expanded Indeterminate State

Set the TreeListView.AllowIndeterminateCheckState property to true to allow an end user to set the node's check box to one of three states (checked, unchecked, or indeterminate):

Tip

In this case, a user can specify a check box's state despite the states of its parents and children. Refer to the Check Nodes Recursively section for information on how to update check states automatically based on child and parent node selection.

The TreeListNode.IsChecked property returns the following values:

  • true - if a node is checked
  • false - if a node is unchecked
  • null - if a node is indeterminated

Expanded Check Nodes Recursively

Set the TreeListView.AllowRecursiveNodeChecking property to true if you want the control to update check states automatically based on child and parent node selection:

  • When you check/uncheck a parent node, its children become checked/unchecked.
  • When you check/uncheck all child nodes, its parent becomes checked/unchecked.
  • When you check/uncheck a child node, but not all child nodes are checked/unchecked, its parent goes to the indeterminate check state.

Expanded Enabled State

Use the following properties to bind the enabled state of check boxes to a property:

Property Description
TreeListView.IsCheckBoxEnabledFieldName Gets or sets the name of a data source's field whose values determine whether a node's check box is enabled.
TreeListView.IsCheckBoxEnabledBinding Gets or sets the binding that determines whether a node's check box is enabled.
Note

The TreeListView.IsCheckBoxEnabledBinding property takes precedence over the TreeListView.IsCheckBoxEnabledFieldName property.

The code sample below shows how to bind the enabled state of check boxes to the Enabled field:

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