TreeListNode.Checked Property

Gets or sets whether the node is checked.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

[Browsable(false)]
[DXCategory("Behavior")]
public virtual bool Checked { get; set; }
<Browsable(False)>
<DXCategory("Behavior")>
Public Overridable Property Checked As Boolean

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.

Examples

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