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.
Refer to the following article to implement pagination
Get the pagination details in AG Grid
- Get the current page number
- Get the total pages
- Get the pagination page size
- 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..!! ๐