Back to Devexpress

DxTreeViewNode.CheckBoxReadOnly Property

blazor-devexpress-dot-blazor-dot-dxtreeviewnode-11dc7025.md

latest2.5 KB
Original Source

DxTreeViewNode.CheckBoxReadOnly Property

Specifies whether the node’s check box is read-only.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(false)]
[Parameter]
public bool CheckBoxReadOnly { get; set; }

Property Value

TypeDefaultDescription
Booleanfalse

true to activate read-only mode; otherwise, false.

|

Remarks

Set the CheckMode property to Multiple or Recursive to display checkboxes in nodes. The CheckedChanged event is raised when a user changes a node’s check state.

Set the CheckBoxReadOnly property to true to activate read-only mode for the node’s check box. To hide the check box, set the AllowCheck property to false.

razor
<DxTreeView CheckMode="TreeViewCheckMode.Multiple">
    <Nodes>
        <DxTreeViewNode Text="Metals">
            <Nodes>
                <DxTreeViewNode CheckBoxReadOnly="true" Text="Alkali metals"/>
                <DxTreeViewNode CheckBoxReadOnly="true" Text="Alkaline earth metals" />
                <DxTreeViewNode Text="Inner transition elements">
                    <Nodes>
                        <DxTreeViewNode Text="Lanthanides"/>
                        <DxTreeViewNode Text="Actinides" />
                    </Nodes>
                </DxTreeViewNode>
                <DxTreeViewNode AllowCheck="false" Text="Transition elements" />
                <DxTreeViewNode AllowCheck="false" Text="Other metals" />
            </Nodes>
        </DxTreeViewNode>
        <DxTreeViewNode Text="Metalloids"/>
        <DxTreeViewNode Text="Nonmetals">
            <Nodes>
                <DxTreeViewNode Text="Halogens"/>
                <DxTreeViewNode Text="Noble gases"/>
                <DxTreeViewNode Text="Other nonmetals"/>
            </Nodes>
        </DxTreeViewNode>
    </Nodes>
</DxTreeView>

See Also

DxTreeViewNode Class

DxTreeViewNode Members

DevExpress.Blazor Namespace