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
- 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.
2. Get the total pages
gridApi.paginationGetTotalPages() method to obtain the AG Grid’s total pages. For further details, check the article below.
3. Get the pagination page size
gridApi.paginationGetPageSize() function to find the page size of the AG Grid. Refer the following article for more information.
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.
I hope you find this article helpful.
Thank you for reading. Happy Coding..!! 🙂