Skip to main content
Tab

BackwardCompatibilitySettings.DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue Property

Specifies whether to allow client access to data source fields that are not associated with any grid columns.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(false)]
public bool DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue { get; set; }

Property Value

Type Default Description
Boolean false

true to enable access to the unlisted data source fields; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue
ASPxWebControl
.BackwardCompatibility .DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue

Remarks

The client API of a grid-like or tree list web control cannot access values of data source fields that are not listed in the grid column collection.

Set the DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue property to true to enable client access to unlisted data source fields.

void Application_Start(object sender, EventArgs e) {
        ASPxWebControl.BackwardCompatibility.DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue = true;
    }

You can use a grid-like control’s AllowReadUnlistedFieldsFromClientApi and the tree list’s AllowReadUnlistedFieldsFromClientApi properties to control this behavior for individual controls.

How to Access a Data Source Field that is Not Associated with Any Grid Columns.

To get values of a data source field that is not associated with any grid columns, do the following:

  1. Create a new column and map it to the required data source field (FieldName property).
  2. Set the column’s Visible and ShowInCustomizationForm (or ShowInCustomizationDialog) properties to false to hide the column.
ASPxGridView1.Columns.Add(new GridViewDataColumn() {
  FieldName = "FIELD_NAME" Visible = false, ShowInCustomizationForm = false
});

You can now use the grid client’s API methods to access values of the column.

See Also