I have the code below to bind data to my grid on the client. The grid is bound to the data, but I am having trouble getting the paging working. Here is my code"
$("#btnSearch").click(function () {
$.ajax({
url: "/Booking/GetBookingLookupData",
type: "POST",
data: null,
contentType: "application/json"
}).success(function (data) {
var d = data;
var gdata = $("#grid").data("kendoGrid");
var ds = new kendo.data.DataSource({
data: d,
pageSize: 10,
serverPaging: false
});
ds.fetch(function () {
ds.serverPaging = false;
});
gdata.dataSource = ds;
gdata.refresh();
});
});
All of the data gets bound to the datasource. I see all of the rows if I do not make it pageable, but the paging is not working. What am I missing?
Thanks,
Wayne
$("#btnSearch").click(function () {
$.ajax({
url: "/Booking/GetBookingLookupData",
type: "POST",
data: null,
contentType: "application/json"
}).success(function (data) {
var d = data;
var gdata = $("#grid").data("kendoGrid");
var ds = new kendo.data.DataSource({
data: d,
pageSize: 10,
serverPaging: false
});
ds.fetch(function () {
ds.serverPaging = false;
});
gdata.dataSource = ds;
gdata.refresh();
});
});
All of the data gets bound to the datasource. I see all of the rows if I do not make it pageable, but the paging is not working. What am I missing?
Thanks,
Wayne