Back to Devexpress

TreeListOptionsBehavior.AllowIndeterminateCheckState Property

windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsbehavior-6c1bc4e4.md

latest4.3 KB
Original Source

TreeListOptionsBehavior.AllowIndeterminateCheckState Property

Gets or sets whether an end-user can switch a node to the indeterminate check state with a mouse click.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowIndeterminateCheckState { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AllowIndeterminateCheckState As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if an end-user can switch a node to the indeterminate check state; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowIndeterminateCheckState
TreeList

.OptionsBehavior .AllowIndeterminateCheckState

|

Remarks

An end-user can switch node states by clicking the check box. If the AllowIndeterminateCheckState property is disabled, a click on the check box changes the node’s state between checked and unchecked. If the AllowIndeterminateCheckState property’s value is true, successive clicks on the check box switch between three states: checked, unchecked and indeterminate.

Regardless of the AllowIndeterminateCheckState , you can apply the indeterminate state to a node in code, using the TreeListNode.CheckState property.

To learn how to enable the node checking feature, see Node Checking - Checkboxes and Radio Buttons.

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

winforms-treelist-custom-check-nodes-behavior/CS/Example/TreeListCheckHelper.cs#L15

csharp
treeList.OptionsView.ShowCheckBoxes = true;
treeList.OptionsBehavior.AllowIndeterminateCheckState = false;
treeList.BeforeCheckNode += treeList1_BeforeCheckNode;

winforms-treelist-custom-check-nodes-behavior/VB/Example/TreeListCheckHelper.vb#L13

vb
treeList.OptionsView.ShowCheckBoxes = True
treeList.OptionsBehavior.AllowIndeterminateCheckState = False
AddHandler treeList.BeforeCheckNode, AddressOf treeList1_BeforeCheckNode

See Also

Node Checking - Checkboxes and Radio Buttons

TreeListOptionsBehavior Class

TreeListOptionsBehavior Members

DevExpress.XtraTreeList Namespace