aspnetmvc-devexpress-dot-web-dot-mvc-dot-spreadsheetsettings.md
Defines the callback routing logic by specifying the names of a Controller and an Action which should handle callbacks.
Namespace : DevExpress.Web.Mvc
Assembly : DevExpress.Web.Mvc5.v25.2.dll
NuGet Package : DevExpress.Web.Mvc5
public object CallbackRouteValues { get; set; }
Public Property CallbackRouteValues As Object
| Type | Description |
|---|---|
| Object |
An object containing the Controller and Action names.
|
The CallbackRouteValues property allows you to pass only simple data (that do not require serialization) to the controller. If you need to send complex data, use one of the following approaches.
@Html.DevExpress().Spreadsheet(settings => {
settings.Name = "Spreadsheet";
...
settings.CallbackRouteValues = new {
Controller = "Home",
Action = "IndexPartial",
myComplexData = Json.Encode(Model.myListData)
};
}).GetHtml()
public ActionResult IndexPartial(string SelectedIds) {
List<int> myData = System.Web.Helpers.Json.Decode<List<int>>(myComplexData);
...
}
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CallbackRouteValues property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
asp-net-mvc-spreadsheet-work-with-database/CS/DXWebApplication23/Controllers/HomeController.cs#L27
settings.Name = "SpreadsheetName";
settings.CallbackRouteValues = new { Controller = "Home", Action = "SpreadsheetPartial" };
settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
asp-net-mvc-spreadsheet-work-with-database/VB/DXWebApplication23/Controllers/HomeController.vb#L29
settings.Name = "SpreadsheetName"
settings.CallbackRouteValues = New With {Key .Controller = "Home", Key .Action = "SpreadsheetPartial"}
settings.Width = System.Web.UI.WebControls.Unit.Percentage(100)
See Also