Back to Devexpress

DxTreeView.Enabled Property

blazor-devexpress-dot-blazor-dot-dxtreeview-5fb0be94.md

latest1.7 KB
Original Source

DxTreeView.Enabled Property

Specifies whether the TreeView component is enabled.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(true)]
[Parameter]
public bool Enabled { get; set; }

Property Value

TypeDefaultDescription
Booleantrue

false to disable the component; otherwise, true.

|

Remarks

Set the Enabled property to false to disable a TreeView component:

razor
<DxTreeView Enabled="false">
  <Nodes>
    <DxTreeViewNode Text="Overview" NavigateUrl="https://demos.devexpress.com/blazor/" />
    <DxTreeViewNode Text="Data Editors" Expanded="true">
      <Nodes>
        <DxTreeViewNode Text="Combobox" NavigateUrl="https://demos.devexpress.com/blazor/ComboBox" />
        <DxTreeViewNode Text="Spin Edit" NavigateUrl="https://demos.devexpress.com/blazor/SpinEdit" />
      </Nodes>
    </DxTreeViewNode>
  </Nodes>
</DxTreeView>

When TreeView is disabled, it becomes non-interactive, and users cannot expand or collapse branches. If certain branches need to be visible in this state, enable their Expanded property.

To hide the TreeView, set its Visible property to false.

See Also

DxTreeView Class

DxTreeView Members

DevExpress.Blazor Namespace