Skip to main content
A newer version of this page is available.

DxTreeView.Enabled Property

Specifies whether the DxTreeView is enabled.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public bool Enabled { get; set; }

Property Value

Type Description
Boolean

true, if the component is enabled; otherwise, false.

Remarks

When the Enabled property is set to false, the DxTreeView doesn’t respond to end-user interactions, such as mouse hovering or clicks.

<button type="button" @onclick="@(() => ToggleTreeViewEnabled())">Disable/Enable TreeView</button>

<DxTreeView Enabled="@TreeViewEnabled">
    <Nodes>
    ...
    </Nodes>
</DxTreeView>

@code  {
    bool TreeViewEnabled { get; set; } = true;

    void ToggleTreeViewEnabled() { TreeViewEnabled = !TreeViewEnabled; }
}
See Also