Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FormLayoutItemBase.ReadOnly Property

Specifies whether the Form Layout element (item, group, tab pages container, or tab) activates read-only mode for nested auto-generated editors.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(false)]
[Parameter]
public bool ReadOnly { get; set; }

#Property Value

Type Default Description
Boolean false

true to activate read-only mode; otherwise, false.

#Remarks

Razor
<DxFormLayout Data="forecast">
    <DxFormLayoutGroup Caption="Weather Forecast">
        <DxFormLayoutItem Caption="Date" Field="@nameof(WeatherForecast.Date)" ReadOnly="true" />
        <DxFormLayoutItem Caption="Temperature" Field="@nameof(WeatherForecast.TemperatureC)" Enabled="false" />
    </DxFormLayoutGroup>
</DxFormLayout>

@code{
    public class WeatherForecast
    {
        public DateTime Date { get; set; }
        public int TemperatureC { get; set; }
        public double Precipitation { get; set; }
    }
    WeatherForecast forecast = new WeatherForecast() { Date = new DateTime(2020, 05, 11), TemperatureC = 20, Precipitation = 5};
}

Disbled and ReadOnly items

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.

Component Property
Form Layout ReadOnly
Tab Pages ReadOnly
Tab Page ReadOnly
Group ReadOnly
Item ReadOnly
Editor <Editor_name>.ReadOnly
See Also