This question is locked. New answers and comments are not allowed.
The pager doesn't seem to be working correctly. I am setting the Total number of records but the pager is rendering as if there were only 1 page of results when there should be many.
Here is my controller
| public ActionResult AdvancedSearch(DisputeSearch search) |
| { |
| var results = disputeService.Search(search).Skip(idx).Take(PageSize).OrderBy(d => d.DisputeID).ToList(); |
| DisputeSearchViewModel dsrvm = new DisputeSearchViewModel() |
| { |
| Disputes = results, |
| TotalRecords = disputeService.Search(search).Count() |
| }; |
| return View("SearchResults", dsrvm); |
| } |
Here is my view code
| <% Html.Telerik().Grid<DisputeSearch>(Model.Disputes) |
| .Name("disputesgrid").PrefixUrlParameters(false) |
| .AssetKey("gridAssetGroup") |
| .Columns(columns => |
| { |
| columns.Add(d => d.DisputeID).Width(50); |
| columns.Add(d => d.TerminalID).Width(50); |
| columns.Add(d => d.ResponseDueDate).Width(50); |
| columns.Add(d => d.CreateDate).Width(50); |
| columns.Add(d => |
| { |
| %> |
| <%= Html.ActionLink("Details", "Details", new { id = d.DisputeID })%> |
| <% |
| }).Title(" ").Width(50).HtmlAttributes(new { align = "center" }); |
| }) |
| .Sortable(sort => sort.SortMode(GridSortMode.SingleColumn)) |
| .Pageable(paging => paging.PageSize(20).Style(GridPagerStyles.NextPreviousAndNumeric).Total(Model.TotalRecords)) |
| .Render(); |
| %> |