or
function
initControls() {
$(
"#ChargesGrid").kendoGrid({
dataSource: {
type:
"json",
transport: {
read: {
url:
"Charge/GetCharges",
dataType:
"json",
type:
"POST"
}
},
pageSize: 5
},
groupable:
false,
sortable:
true,
pageable: {
refresh:
false,
pageSizes:
true
},
columns: [
{ field:
"Description", title: resourcesSet.str_Desc, width: "150px" },
{ field:
"Amount_Due", title: resourcesSet.str_AmtDue, width: "50px" },
{ field:
"Date", title: resourcesSet.str_Date, width: "50px" },
{ field:
"Title", title: resourcesSet.str_Title, width: "150px" },
{ command: { text:
"Edit", click: showForm }, title: " ", width: "80px"}]
});
}
This is my html rendering the grid
<table id="ChargesGrid"></table>
RouteValueDictionary routeValues = this.GridRouteValues();return RedirectToAction("Index", routeValues);I am taking an existing project and adding KendoUI in place of Grid's by another vendor.
The project uses IoC, UnitOfWork etc and so the MVC controllers do not directly use the Context and I cannot see the ToDataSourceResult method.
I have got it mostly working using .Server(), but now want to start using Ajax.
What does ToDataSourceResult do, and how can I replicate its functionality?