Skip to main content
A newer version of this page is available.
All docs
V20.2

DxFormLayoutItem.Enabled Property

Specifies whether a Form Layout item’s editor 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 editor is enabled; otherwise, false.

Remarks

Use the Enabled property to enable or disable a Form Layout item’s editor. This property only affects an auto-generated editor in an item.

<DxFormLayout Data="@editFormData">
            <DxFormLayoutItem Field="@nameof(FormDataItem.Name)" Caption="Contact Name:" />
            <DxFormLayoutItem Field="@nameof(FormDataItem.BirthDate)" Caption="Birth Date:" Enabled="false"/>
            <DxFormLayoutItem Field="@nameof(FormDataItem.YearsWorked)" Caption="Years Worked:" />
            ...
</DxFormLayout>

Form Layout Item Enabled

To enable/disable a custom editor in an item template, use the editor’s Enabled property.

<DxFormLayout>
    <DxFormLayoutItem Caption="Contact Name:">
        <Template>
            <DxTextBox @bind-Text="@Name"></DxTextBox>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="Email:">
        <Template>
           <DxTextBox @bind-Text="@Email"></DxTextBox>
        </Template>
    </DxFormLayoutItem>

    <DxFormLayoutItem Caption="Birth Date:">
        <Template>
            <DxDateEdit @bind-Date="@BirthDate" Enabled="false"></DxDateEdit>
        </Template>
    </DxFormLayoutItem>

    ...

</DxFormLayout>

Form Layout Item Enabled

See Also