All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

TreeViewControl.NodeCheckStateChanged Event

Occurs when a node's check box value is changed.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.dll

Declaration

public event TreeViewNodeEventHandler NodeCheckStateChanged
Public Event NodeCheckStateChanged As TreeViewNodeEventHandler

Event Data

The NodeCheckStateChanged event's data class is DevExpress.Xpf.Grid.TreeList.TreeViewNodeEventArgs.

Remarks

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

<dxg:TreeViewControl ShowCheckboxes="True"
                     NodeCheckStateChanged="treeview_NodeCheckStateChanged"
                     .../>
using DevExpress.Xpf.Grid;

void treeview_NodeCheckStateChanged(object sender, DevExpress.Xpf.Grid.TreeList.TreeViewNodeEventArgs e){
    if (e.Node.IsChecked.Value && e.Node.HasChildren){
        foreach (TreeListNode node in e.Node.Nodes){
            node.IsChecked = false;
        }
    }
}

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

Method Description
TreeViewControl.CheckAllNodes Checks all nodes.
TreeViewControl.UncheckAllNodes Unchecks all nodes.
TreeListNode.IsChecked Checks/unchecks the node.
See Also