aspnetmvc-devexpress-dot-web-dot-mvc-dot-gridviewsettings-96002619.md
Defines the callback routing logic by specifying the names of Controllers and Actions that handle callbacks related to grid data operations such as paging, sorting, grouping and filtering.
Namespace : DevExpress.Web.Mvc
Assembly : DevExpress.Web.Mvc5.v25.2.dll
NuGet Package : DevExpress.Web.Mvc5
public Dictionary<GridViewOperationType, object> CustomBindingRouteValuesCollection { get; }
Public ReadOnly Property CustomBindingRouteValuesCollection As Dictionary(Of GridViewOperationType, Object)
| Type | Description |
|---|---|
| Dictionary<GridViewOperationType, Object> |
An object containing the data operation type (identified by GridViewOperationType) and the names of Controllers and Actions.
|
The CustomBindingRouteValuesCollection property allows you to assign particular handling Actions for four data operations - Paging, Sorting, Grouping and Filtering. These data operations are specifically exposed to be handled in a custom manner to implement custom data binding of the GridView. These operations are identified by values of the GridViewOperationType enumeration.
Refer to Action Types and Passed Parameters to learn more.
A code sample detailing how to use the CustomBindingRouteValuesCollection property is provided below.
Partial View Code:
@Html.DevExpress().GridView(
settings => {
...
settings.CustomBindingRouteValuesCollection.Add(
GridViewOperationType.Paging,
new { Controller = "MyController", Action = "MyPagingAction" }
);
settings.CustomBindingRouteValuesCollection.Add(
GridViewOperationType.Sorting,
new { Controller = "MyController", Action = "MySortingAction" }
);
settings.CustomBindingRouteValuesCollection.Add(
GridViewOperationType.Grouping,
new { Controller = "MyController", Action = "MyGroupingAction" }
);
settings.CustomBindingRouteValuesCollection.Add(
GridViewOperationType.Filtering,
new { Controller = "MyController", Action = "MyFilteringAction" }
);
...
See Also