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

[Solved] Grids Empties when changing "Items per page"

0 Answers 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Guillermo
Top achievements
Rank 1
Guillermo asked on 22 Oct 2012, 06:52 PM
Here's my view code:
@model IEnumerable<Integra.Models.DocumentModel>
@{
    Html.RenderPartial("~/Views/Navigation/HopperMenu.cshtml");
}
 
<div>
    @(Html.Kendo().Grid(Model)
        .Name("Grid")
        .Pageable(p => p.PageSizes(new int[] {15,30,60,120}))
        .Filterable()
        .Sortable()
        .Scrollable()
        .Selectable()
         
            //.Columns(columns => columns.Bound(dm => dm.DocumentNote))
        .Columns(columns =>
                     {
                         columns.Bound(dm => dm.CaseId);
                         columns.Bound(dm => dm.PresidingJudge);
                         columns.Bound(dm => dm.MagistrateJudge);
                         columns.Bound(dm => dm.CaseType);
                         columns.Bound(dm => dm.Status);
                         columns.Bound(dm => dm.UserName);
                         columns.Bound(dm => dm.CreationDate);
                         columns.Bound(dm => dm.PageCount);
                     }
          )
          .DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(false)
        .PageSize(60)
        .Read(read => read.Action("Index", "Hopper"))
        )
    )
 
 
</div>

 

My view loads up fine the first time but if I change the Items per page it executes my controller (as expected) and my controller returns an IEnumerable with data but the grid clears out and I don't see anything.

What am I missing?

 

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