Show record count, but no pagination

2 posts, 0 answers
  1. Joe
    Joe avatar
    220 posts
    Member since:
    May 2012

    Posted 05 Sep 2019 Link to this post

    I want to show the total number of records in a grid, in the grid footer, but I do not want to have pagination in my grid.  How do I accomplish this?
  2. Tsvetomir
    Admin
    Tsvetomir avatar
    757 posts

    Posted 09 Sep 2019 Link to this post

    Hi Joe,

    Generally, the information about the total count of the items is a functionality of the pager. Therefore, if you would like to show the items count without enabling paging, I can suggest two approaches:

    1. In the Pageable configuration of the grid set the .Numeric(false) and PreviousNext(false). And set a PageSize() large enough to fit all of the items from the data source. 

    2. Disable the paging. And for the last column of the grid set the count aggregate. Then in the ClientFooterTemplate of the same column, show the count. This would lead to something similar to the live demo below:

    https://demos.telerik.com/aspnet-mvc/grid/aggregates

    Let me know in case additional clarifications are needed for either of the approaches.


    Best regards,
    Tsvetomir
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top