Hi guys, I've got a strange problem with my grid that has server side paging.
what we have done is abstract the the Kendo grid away from out current code using obtrusive javascript like so
var options = {
reorderable: $(element).attr("data-grid-reorderable"),
autoBind: $(element).attr("data-grid-autoBind"),
groupable: $(element).attr("data-grid-groupable"),
width: $(element).attr("data-grid-width"),
height: "400",
scrollable: true,
columns: columns,
dataSource: {
transport: { read: { url: $(element).attr("data-grid-datasource-url"), data: window[$(element).attr("data-grid-datasource- data")] } },
sortable: { mode: "multiple", allowUnsort: true },
type: "aspnetmvc-ajax",
filter: [],
group: groups,
schema: {
data: $(element).attr("data-grid-schema-data"),
total: $(element).attr("data-grid-schema-total"),
errors: $(element).attr("data-grid-schema-errors"),
model: model,
scrollable: true
},
pageSize: $(element).attr("data-grid-datasource-pagesize"),
serverPaging: $(element).attr("data-grid-datasource-pageable"),
serverFiltering: $(element).attr("data-grid-datasource-filtering"),
serverSorting: $(element).attr("data-grid-datasource-sortable")
},
pageable: $(element).attr("data-grid-pageable"),
columnMenu: true
};
this all works fine for the first page of the grid but the problem is when the page changes we return the data in exactly the same data structure that worked on page 1 but it doesn't work on page 2? the grid is just empty.
Can anyone help with this? it's a very strange issue because it works perfectly fine on the first page.
cheers.
ste.
what we have done is abstract the the Kendo grid away from out current code using obtrusive javascript like so
var options = {
reorderable: $(element).attr("data-grid-reorderable"),
autoBind: $(element).attr("data-grid-autoBind"),
groupable: $(element).attr("data-grid-groupable"),
width: $(element).attr("data-grid-width"),
height: "400",
scrollable: true,
columns: columns,
dataSource: {
transport: { read: { url: $(element).attr("data-grid-datasource-url"), data: window[$(element).attr("data-grid-datasource- data")] } },
sortable: { mode: "multiple", allowUnsort: true },
type: "aspnetmvc-ajax",
filter: [],
group: groups,
schema: {
data: $(element).attr("data-grid-schema-data"),
total: $(element).attr("data-grid-schema-total"),
errors: $(element).attr("data-grid-schema-errors"),
model: model,
scrollable: true
},
pageSize: $(element).attr("data-grid-datasource-pagesize"),
serverPaging: $(element).attr("data-grid-datasource-pageable"),
serverFiltering: $(element).attr("data-grid-datasource-filtering"),
serverSorting: $(element).attr("data-grid-datasource-sortable")
},
pageable: $(element).attr("data-grid-pageable"),
columnMenu: true
};
this all works fine for the first page of the grid but the problem is when the page changes we return the data in exactly the same data structure that worked on page 1 but it doesn't work on page 2? the grid is just empty.
Can anyone help with this? it's a very strange issue because it works perfectly fine on the first page.
cheers.
ste.