Skip to main content
All docs
V21.1

DxFormLayoutItem.ReadOnly Property

Specifies whether the Form Layout item activates read-only mode for a nested auto-generated editor.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public bool ReadOnly { get; set; }

Property Value

Type Default Description
Boolean false

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

Remarks

Set the ReadOnly property to true to protect the item’s editor from accidental changes. A user still can move focus to the editor.

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

Form Layout Item Read-Only Mode

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