How to get the pagination details in React AG Grid

In this article, we’ll show you how to get the pagination details such as total pages, page size, current page number and total number of rows, etc in React AG Grid. This will be used for the both client side and server side pagination.

Get the pagination details in AG Grid

  1. Get the current page number
  2. Get the total pages
  3. Get the pagination page size
  4. Get the total number of rows

1. Get the current page number

To get the current page number in the AG Grid, use the gridApi.paginationGetCurrentPage() function. Refer to the following article for more information.

How to get the current page number in AG Grid

2. Get the total pages

Use the gridApi.paginationGetTotalPages() method to obtain the AG Grid’s total pages. For further details, check the article below.

How to get the total pages in AG Grid

3. Get the pagination page size

Use the gridApi.paginationGetPageSize() function to find the page size of the AG Grid. Refer the following article for more information.

How to get the pagination page size in React AG Grid

4. Get the total number of rows

To get the total number of rows, call the gridApi.paginationGetRowCount() function. Check out the article below for step-by-step guidance.

How to get the total number of rows in AG Grid

I hope you find this article helpful.
Thank you for reading. Happy Coding..!! 🙂

If you found value in this article,
you can support us by buying me a coffee! ☕

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *