aspnet-devexpress-dot-web-dot-gridviewdatacolumn-fd916e43.md
Specifies whether the values of read-only columns can be loaded from a data source (model).
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(true)]
public virtual bool LoadReadOnlyValueFromDataModel { get; set; }
<DefaultValue(True)>
Public Overridable Property LoadReadOnlyValueFromDataModel As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to restrict users to load read-only columns’ values from a data source (model); otherwise, false.
|
Web Forms:
<dx:ASPxGridView ID="gridView" >
<Columns>
<dx:GridViewDataColumn FieldName="ProductName" LoadReadOnlyValueFromDataModel="False" />
</Columns>
</dx:ASPxGridView>
MVC:
settings.Columns.Add(column => {
column.FieldName = "ProductName";
column.LoadReadOnlyValueFromDataModel = false;
});
See Also
Breaking Change: A read-only column's editors reset client values to initial server values
ASPxGridDataSecuritySettings.PreventLoadClientValuesForReadOnlyColumns
BackwardCompatibilitySettings.DataControlPreventLoadClientValuesForReadOnlyColumns