Back to Devexpress

DxEditorBase.Enabled Property

blazor-devexpress-dot-blazor-dot-base-dot-dxeditorbase-3c94c1fc.md

latest1.6 KB
Original Source

DxEditorBase.Enabled Property

Specifies whether the component can respond to user interactions.

Namespace : DevExpress.Blazor.Base

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

When the Enabled property is set to false, the component does not respond to user interactions and users cannot change the editor’s value. In this mode, the component cannot be focused or navigated.

The following code disables the List Box component:

razor
<DxListBox Data="@Cities" 
           @bind-Values="@Values" 
           Enabled="false">
</DxListBox>

@code {
  IEnumerable<string> Cities = new List<string>() {
    "London",
    "Berlin",
    "Paris",
  };

  IEnumerable<string> Values { get; set; } 
}

Run Demo: Data Editors - Read-Only and Disabled Modes

Implements

Enabled

See Also

DxEditorBase Class

DxEditorBase Members

DevExpress.Blazor.Base Namespace