Skip to main content

TreeListNode.Checked Property

Gets or sets whether the node is checked.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v24.1.dll

NuGet Packages: DevExpress.Win.Navigation, 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;
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Checked 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