Pagination broken when data source count exceeds items per page.

When adding rows to my data source, (if items per page is set to 5) when I reach 6 rows in the table the page size and settings template becomes null and pagination stops working until the the grid is re-rendered by clicking refresh. I attempted to call changedatasource() on the row save event without passing a parameter this worked to fix the pagination issue however the sorting of the data is lost. How can I reset the pager without re-rendering the grid? 


3 Replies

JS Johnson Soundararajan S Syncfusion Team June 5, 2024 11:50 AM UTC

Hi Zach Tumbusch,

 
Greetings from the Syncfusion support,


We noticed that a grid with a pageSize of 5, when adding a 6th row to the grid, it becomes null and pagination stops working. We attempted to create a sample based on your requirement. However, we are unable to find the issue you mentioned.


Sample : 84ctkx (forked) - StackBlitz
 

If you are still experiencing a problem, please provide the following information:
 

  1. Kindly provide additional information regarding the requirement.
  2. Please share your complete grid rendering code with the associate event.
  3. Please share the simple replicating sample and replication procedures in step by step
  4. Share us the video demonstration of the reported issue.
  1. Please provide the current Syncfusion package version which you are using in your application.


The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.


Regards,

Johnson Soundararajan S




HA Hannah February 20, 2026 03:09 PM UTC

It sounds like the pager state isn’t being refreshed when the data source changes dynamically. Instead of calling changeDataSource() without parameters (which resets sorting), try using refresh() or refreshPager() after updating the data source to keep the current sort settings intact. You can also reassign the same dataSource reference after updating the array to trigger proper state tracking. Think of it like applying a photobooth filter you want to refresh the view without changing the original structure underneath.



ST Susie Tapley February 24, 2026 08:24 AM UTC

Encountering pagination problems can be frustrating! It sounds like your data source is outgrowing your initial pagination setup. Have you tried explicitly recalculating the pager state after data changes? Perhaps a little code tweak, like navigating the Google Snake cleverly to eat more apples (data), will trigger a refresh internally without losing sorting. Let me know if you've explored specific pager methods; maybe we can help debug!


Loader.
Up arrow icon