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

Paging with MVC Kendo UI on Server Side not working

2 Answers 162 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 30 Jul 2012, 03:24 AM
I've seen samples that show how to set up paging with the Kendo Grid, but it does not work.   Why isn't it working?

The 'view' code looks like:
@(Html.Kendo().Grid(Model)
       .Name("AlertReport")
               .Pageable(paging => paging.PageSize(20).Position(GridPagerPosition.Bottom))

and the controller looks like:
public ActionResult Index()
        {
var output = db.ExecuteStoreQuery<Report>("Report @accountID={0}", AccountIDGet()).ToList();
                 
return View(output);
}

2 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 31 Jul 2012, 02:59 PM
This app. is using razor.
0
Support Team
Top achievements
Rank 1
answered on 29 Aug 2012, 12:05 AM
From what I see, the line:
paging.PageSize(20).Position(GridPagerPosition.Bottom) 

isn't supported by Kendo Grid, but is leftover from the ASP.NET MVC controls.  Try setting the PageSize in the Datasource.  Something like:
.DataSource(ds => ds.Server().PageSize(20))
Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Support Team
Top achievements
Rank 1
Share this question
or