Closed karthikking closed 7 years ago
You're setting result.TotalRecords
twice: the first time is correct (before checking the sort column), the second time is incorrect since it will get the count after the query has been told to limit the entries to 10 (or whatever limit). On the other hand, it's hard to tell what you're doing and what you want to accomplish, since many lines are commented out (including the one that gets the paged results [query.Skip
]).
Thanks i have fixed result.TotalRecords issue
My code
I have issue is page list of records per page. I have overall records as 17 in list and page size mentioned as 10, not listed 10 records in per page, it is listed 17 records single page but footer items records and page are showing as 10 per page. Issue in listed items in grid data.
My code
public static void RegisterGrids() { // add your Grid definitions here, using the MVCGridDefinitionTable.Add method GridDefaults defaultSet1 = new GridDefaults() { Paging = true, ItemsPerPage = 10, DefaultSortColumn = "Org_Street", MaxItemsPerPage = 10, Sorting = true, NoResultsMessage = "Sorry, no results were found"
Thanks Kaarthik.