Best way to implement custom pagination in AG-Grid Angular

37 Views Asked by At

I am trying to implement Custom Pagination in AG-Grid angular and I am not sure what's the right and best practice to take into consideration.

I have a requirement where if I click the first button it should go to first page and last button should go to the last page. There are next and previous buttons aswell. The page size is fixed with 50 as the limit. Whenever a button is clicked an API call would be made and the result will be displayed on the table. The page number and remaining pages should also be calculated based on the total records available which we will be getting from the backend.

Now my question is how to achieve this, should I use Ag-grid's row model, or should I do custom implementation on my own considering that I also need custom template for the pagination. Is DataSource required here, or I can just go with the RowData.

Here is the visual representation of the requirement. Custom-Pagination

0

There are 0 best solutions below