Skip to main content

TreeListNode.CheckState Property

Gets or sets the node’s check state.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v23.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

[DefaultValue(CheckState.Unchecked)]
[DXCategory("Behavior")]
public virtual CheckState CheckState { get; set; }

Property Value

Type Default Description
CheckState Unchecked

A CheckState enumeration value that specifies the node’s check state.

Remarks

If the TreeListOptionsBehavior.AllowIndeterminateCheckState option is disabled, a node can have two states: checked and unchecked. In this mode, to get/set check states, use the TreeListNode.Checked property.

If the TreeListOptionsBehavior.AllowIndeterminateCheckState option is enabled, three check states are supported: checked, unchecked and indeterminate. In this instance, use the CheckState property to get/set a node’s state.

See Node Checking - Checkboxes and Radio Buttons to learn more.

Example

The following code shows how to retrieve checked nodes using the TreeList.GetAllCheckedNodes method, and modify their values.

List<TreeListNode> list = treeList1.GetAllCheckedNodes();
foreach (TreeListNode node in list) {
    decimal budget = Convert.ToDecimal(node["BUDGET"])*1.1m;
    node["BUDGET"] = budget;
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the CheckState property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also