Skip to main content

TreeListNode.Checked Property

Gets or sets whether the node is checked.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v22.2.dll

NuGet Package: DevExpress.Win.TreeList

Declaration

[Browsable(false)]
[DXCategory("Behavior")]
public virtual bool Checked { get; set; }

Property Value

Type Description
Boolean

true if the node is checked; otherwise, false.

Remarks

Use the Checked property to get/set a node’s check state when nodes can only have two check states (checked and unchecked).

If the TreeListOptionsBehavior.AllowIndeterminateCheckState property is true, a node can have three check states: checked, unchecked and indeterminate. In this instance, to get/set a node’s check state, use the TreeListNode.CheckState property.

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