Skip to main content
A newer version of this page is available. .

FormLayoutItemBase.ReadOnly Property

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

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v22.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Description
Boolean

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

Remarks

Set the ReadOnly property to true to protect the 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