DxTreeViewBase.Enabled Property

Specifies whether the DxTreeView is enabled.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.dll

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