Skip to main content
All docs
V23.2

DxEditSettings.ReadOnly Property

Specifies whether a user can change an editor’s value.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(null)]
[Parameter]
public bool? ReadOnly { get; set; }

Property Value

Type Default Description
Nullable<Boolean> null

true to prevent users from changing the editor value; false to allow users to change the editor value; null to inherit the value from the DxGridDataColumn.ReadOnly property.

Remarks

In read-only mode, the editor displays a value but does not allow users to change it. Use the ReadOnly property to activate or deactivate this mode. If the editor’s ReadOnly property unspecified, the column’s ReadOnly property value determines whether the editor is in read-only mode.

Note that the ReadOnly property does not affect the editor displayed in the filter row. To hide the filter row editor, set the FilterRowEditorVisible property to false.

<DxGrid Data="@products" 
        ShowFilterRow="true" 
        EditMode="GridEditMode.EditRow">
    <Columns>
        <DxGridCommandColumn />
        <DxGridDataColumn FieldName="ProductID" >
            <EditSettings>
                <DxSpinEditSettings ShowSpinButtons="false" ReadOnly="true" NullText="Type the ID" />
            </EditSettings>
        </DxGridDataColumn>
        <DxGridDataColumn FieldName="ProductName" />
        <DxGridDataColumn FieldName="UnitPrice" />
        <DxGridDataColumn FieldName="UnitsInOrder" />
    </Columns>
</DxGrid>

Modified Editors

To enable or disable the read-only mode at runtime, use the IEditSettings.ReadOnly property.

Implements

See Also