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

Kendo Grid - Paging in ASP.NET MVC Razor example

3 Answers 592 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bhushan
Top achievements
Rank 1
Bhushan asked on 18 Dec 2012, 10:12 AM
Hi,
I am using trial version of Kendo UI and trying to use Grid control.

I am referring the example shown in link http://demos.kendoui.com/web/grid/index.html and looking at Basic Usage.

I am using ASP.NET MVC 4 Razor, and I got Kendo Grid working on a page, but only thing is I am not able to get paging working on it.
the example shown for cshtml page doesn't show how to configure page size but html example shows , so not sure how to set paging limit set in cshtml page?

can you please help?

3 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 19 Dec 2012, 02:08 PM
Hi Bhushan,

 
Basically you can set the Grid page size from the DataSource PageSize option:

DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(5)
        .Read(read => read.Action("Products_Read", "Grid"))
    )
Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bhushan
Top achievements
Rank 1
answered on 19 Dec 2012, 02:17 PM
Thanks a lot for your reply.

Yes you are right , I figured that out after few hours of posting question here :).
It would be better If you update your basic usage documentation of grid for MVC to show how you can set paging. also I think even though you see paging enabled but unless and until you add references of jQuery 1.8.2 and kendo.aspnetmvc.min.js on your page , the paging doesn't work.

Appreciate your responce , Thanks.
0
hash
Top achievements
Rank 1
answered on 13 Feb 2013, 10:59 PM
It is the client side paging right, but what if i want to do server side paging, sorting?
Tags
Grid
Asked by
Bhushan
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Bhushan
Top achievements
Rank 1
hash
Top achievements
Rank 1
Share this question
or