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.v24.2.dll
Declaration
[DefaultValue(false)]
public bool DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Boolean | false |
|
Property Paths
You can access this nested property as listed below:
Object Type | Path to DataControlAllowReadUnlistedFieldsFromClientApiDefaultValue |
---|---|
ASPxWebControl |
|
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:
- Create a new column and map it to the required data source field (FieldName property).
- 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.