This is a migrated thread and some comments may be shown as answers.

Kendo, how to do Grid server paging using mvc4 helper

0 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 03 Oct 2012, 07:02 PM

I am using mvc4. On one of my page, it has Kendo Grid. I want to show 5 rows per page. I have no problem doing it using pure javascript, however, If I am using mvc helper. I got lost, couldn't find any samples online.

here's my javascript code.




$(document).ready(function () {
$("#grid").kendoGrid({
dataSource: {
type: "json",
serverPaging: true,
pageSize: 5,
transport: { read: { url: "Products/GetAll", dataType: "json"} },
schema: { data: "Products", total: "TotalCount" }
},
height: 400,
pageable: true,
columns: [
{ field: "ProductId", title: "ProductId" },
{ field: "ProductType", title: "ProductType" },
{ field: "Name", title: "Name" },
{ field: "Created", title: "Created" }
],
dataBound: function () {
this.expandRow(this.tbody.find("tr.k-master-row").first());
}
});
});



now if i am using mvc helper

@(Html.Kendo().Grid(Model) 
.Name("Grid")  // please help me to finish this



No answers yet. Maybe you can help?

Tags
Grid
Asked by
John
Top achievements
Rank 1
Share this question
or