windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsbehavior-6d002c9b.md
Gets or sets whether node check states can be specified dynamically - using the TreeList.VirtualTreeGetCellValue/TreeList.VirtualTreeSetCellValue events, and IVirtualTreeListData.VirtualTreeGetCellValue / VirtualTreeSetCellValue interface methods.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowBoundCheckBoxesInVirtualMode { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AllowBoundCheckBoxesInVirtualMode As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if node check states can be specified dynamically - via dedicated events and methods; false if these events/methods are only fired to get/set node values.
|
You can access this nested property as listed below:
| Object Type | Path to AllowBoundCheckBoxesInVirtualMode |
|---|---|
| TreeList |
.OptionsBehavior .AllowBoundCheckBoxesInVirtualMode
|
TreeList allows you to implement virtual binding mode (dynamic data load) by handling the TreeList.VirtualTreeGetCellValue and TreeList.VirtualTreeSetCellValue events, or by binding the control to a business object that implements the IVirtualTreeListData interface. See the following topics to learn more.
You can use the TreeListOptionsView.CheckBoxStyle, TreeListOptionsView.RootCheckBoxStyle and TreeListNode.ChildrenCheckBoxStyle properties to enable node built-in check boxes/radio buttons that allow end-users to check certain nodes. In this case, you can set the AllowBoundCheckBoxesInVirtualMode property to true to use the TreeList.VirtualTreeGetCellValue/TreeList.VirtualTreeSetCellValue events and IVirtualTreeListData.VirtualTreeGetCellValue / VirtualTreeSetCellValue methods to specify not only node values, but also node check states.
When the AllowBoundCheckBoxesInVirtualMode property is true , the TreeList.VirtualTreeGetCellValue event/ IVirtualTreeListData.VirtualTreeGetCellValue interface method will additionally be fired for each node with the VirtualTreeGetCellValueInfo.IsCheckState parameter set to true. To provide a node’s check state, assign it to the VirtualTreeGetCellValueInfo.CellData parameter (when IsCheckState is true ).
Similarly, when an end-user modifies a node’s check state, the TreeList.VirtualTreeSetCellValue event/ IVirtualTreeListData.VirtualTreeSetCellValue interface method will be fired with the VirtualTreeSetCellValueInfo.IsCheckState parameter set to true. In this case, save the node’s check state (which is stored in the VirtualTreeSetCellValueInfo.NewCellData parameter) according to your logic.
See Also
Virtual Mode - Load Data Using Events
Virtual Mode - Binding to a Hierarchical Business Object (Data Source Level)
Node Checking - Checkboxes and Radio Buttons