Back to Devexpress

DxFormLayout.Enabled Property

blazor-devexpress-dot-blazor-dot-dxformlayout-b0f0a787.md

latest2.5 KB
Original Source

DxFormLayout.Enabled Property

Specifies if auto-generated editors are enabled in the Form Layout.

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

true if editors are enabled; otherwise, false.

|

Remarks

Use the Enabled property to enable or disable auto-generated editors in the Form Layout. Users cannot focus disabled editors.

razor
<DxFormLayout Data="forecast" Enabled="false">
    <DxFormLayoutItem Caption="Date" Field="@nameof(WeatherForecast.Date)" />
    <DxFormLayoutGroup Caption="Information">
        <DxFormLayoutItem Caption="Temperature" Field="@nameof(WeatherForecast.TemperatureC)" />
        <DxFormLayoutItem Caption="Precipitation" Field="@nameof(WeatherForecast.Precipitation)" />
    </DxFormLayoutGroup>
</DxFormLayout>

@code {
    private WeatherForecast forecast = new WeatherForecast { Date = DateTime.Today, TemperatureC = 20, Precipitation = 5 };

    public class WeatherForecast {
        public DateTime Date { get; set; }
        public int TemperatureC { get; set; }
        public double Precipitation { get; set; }
        public string? Summary { get; set; }
        public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
    }
}

The Form Layout and its elements (tabs, tab pages, and groups) apply this property’s value to nested elements. You can specify the corresponding property for a nested element to override this setting.

ComponentProperty
Form LayoutEnabled
Tab PagesEnabled
Tab PageEnabled
GroupEnabled
ItemEnabled
Editor<Editor_name>.Enabled

See Also

DxFormLayout Class

DxFormLayout Members

DevExpress.Blazor Namespace