windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsview-2ecd2545.md
Gets or sets whether all TreeList nodes should display check boxes, radio buttons, or neither.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
[DefaultValue(DefaultNodeCheckBoxStyle.Default)]
[XtraSerializableProperty]
public virtual DefaultNodeCheckBoxStyle CheckBoxStyle { get; set; }
<DefaultValue(DefaultNodeCheckBoxStyle.Default)>
<XtraSerializableProperty>
Public Overridable Property CheckBoxStyle As DefaultNodeCheckBoxStyle
| Type | Default | Description |
|---|---|---|
| DevExpress.XtraTreeList.DefaultNodeCheckBoxStyle | Default |
A DevExpress.XtraTreeList.DefaultNodeCheckBoxStyle enumerator value that specifies the type of content displayed by nodes. The Default value means nodes display neither check boxes, nor radio buttons.
|
You can access this nested property as listed below:
| Object Type | Path to CheckBoxStyle |
|---|---|
| TreeList |
.OptionsView .CheckBoxStyle
|
You can override the CheckBoxStyle setting for specific nodes. To do that, use the TreeListOptionsView.RootCheckBoxStyle and TreeListNode.ChildrenCheckBoxStyle properties.
See Node Checking - Checkboxes and Radio Buttons to learn more.
Demo: Select With Radio Buttons and Check Boxes module in the XtraTreeList MainDemo
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;
}
Dim list As List(Of TreeListNode) = treeList1.GetAllCheckedNodes()
For Each node As TreeListNode In list
Dim budget As Decimal = Convert.ToDecimal(node("BUDGET")) * 1.1D
node("BUDGET") = budget
Next
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CheckBoxStyle 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.
if(tree.OptionsView.CheckBoxStyle == DefaultNodeCheckBoxStyle.Radio) {
skipMasterFiltering = true;
If tree.OptionsView.CheckBoxStyle = DefaultNodeCheckBoxStyle.Radio Then
skipMasterFiltering = True
See Also