Skip to main content

TreeListNode.CheckState Property

Gets or sets the node’s check state.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v22.2.dll

NuGet Package: 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;
}
See Also