Custom Binding Limitations
- 3 minutes to read
In custom binding mode, the MVC VerticalGrid does not have simultaneous access to the bound data in its entirety. This imposes certain limitations on the grid features available in regular binding mode.
see the list below for information on features that have limitations in custom binding mode.
The grid’s built-in facilities for custom data processing (such as custom sorting and summarization) are not in effect.
Unlike in standard binding mode (in which data is processed automatically), you are responsible for retrieving the required portion of data from a data source (Model) using code and passing this data to the VerticalGrid. The extension does not have access to all of the data in your Model. Although the VerticalGrid includes built-in features that allow you to control custom data processing in standard binding mode, these features are not in effect in custom binding, because they require the grid to access all data rows in the Model.
As a result, custom binding mode places a limit on the following data processing operations.
- Custom sorting using VerticalGridSettings.CustomRowSort is not supported.
- Custom summary calculation implemented using VerticalGridSettings.CustomSummaryCalculate is not supported.
Since in custom binding mode, you control the logic of selecting and processing the model data, implement similar custom data processing scenarios in your custom code if your application logic requires it. You can do this when populating the VerticalGrid view model at the Model level.
Data binding notifications are not supported.
The GridSettingsBase.DataBinding and GridSettingsBase.DataBound events are not raised in custom binding mode, since you provide data to the grid manually in the Controller.
Exporting via ExportTo[FORMAT], Write[FORMAT] or Write[FORMAT]ToResponse methods is not supported.
By design, the entire data source is required to perform an automatic export operation. It is not possible to export only a portion of the data - the VerticalGrid view model.
Using the built-in SelectAll check box in the select all rows (on all grid pages) mode defined by the VerticalGridCommandRow.SelectAllCheckboxMode property set to GridViewSelectAllCheckBoxMode.AllPages is not supported.
The VerticalGrid can process record selection changes only on the current page. It is not possible to select records on other grid pages, since the grid knows about only a portion of data provided by the grid’s view model and can work only with this portion.
Layout persistence implemented with GridSettingsBase.ClientLayout is partially supported using a workaround.
The current workaround to loading the saved client layout data requires that you send an extra callback to the server - by calling the client PerformCallback (MVCxClientVerticalGrid.PerformCallback) method with an empty parameter in the VerticalGrid’s Init (ASPxClientControlBase.Init) client event handler. This makes client layout data available in the Controller (using VerticalGridModel, which maintains the grid’s state) and passes the grid state to custom binding delegate methods as the VerticalGridCustomBindingArgsBase.State argument.