Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1730
Adding pager to grid not showing records
posted

Hi,

I am using Asp.Net MVC 3 and Infragistic Grid.

I have over 400 Records and my page size is set as 50.

@(Html

  .Infragistics().Grid<SearchSummary>(Model.SearchResults.AsQueryable()).ID("wbGrid") 

.Columns( col => {  col.For(x => x.SummaryID).HeaderText("ID").Template("<a id='lnkSummaryID' href='${SummaryID}'>${SummaryID}</a>"); col.For(x => x.SummaryName).HeaderText("Run Id"); col.For(x => x.InventoryID).HeaderText("Inventory"); col.For(x => x.ProcessName).HeaderText("Process Name"); col.For(x => x.SystemName).HeaderText("System Name"); col.For(x => x.SummaryCreateDate).HeaderText("Created Date");

})

.Features(features => {

features.Selection().Mode(SelectionMode.Row).MultipleSelection(false).Activation(true);

features.Paging().PageSize(50).TotalRecordsCount(Model.SearchResults.Count);

})

.Height("400px").DataBind().Width("800px").Render())

 

When I run the application, only the first page shows data, whereas the other pages are empty.

Here is the screenshot for reference ( https://www.dropbox.com/s/nb8ezigmoz1h0al/Grid_Pager_Problem.png )

What's wrong here ??? Any help would be appreciated.

Parents
No Data
Reply
  • 23953
    Verified Answer
    Offline posted

    Hi,

    You should explicitly set your paging to be local.

    Replace your paging declaration with this code:

    features.Paging().PageSize(50).Type(OpType.Local);

    Also TotalRecordsCount is set implicitly so you don't need to set it.

     

    Best regards,

    Martin Pavlov

    Infragistics, Inc.

Children
No Data