I have a similar problem.
In my case I don't know at the start of my grid the number of records; either because this one is very fluctuating, or because the calculation of the count is too expensive in execution time (more than fetch n records)
So to have the pager, I return a count to maxint
But when user go to the end of data, we can detect that and know the real number of rows, that the server returns in the DataSourceResult (in ASP.Net)
The pager is then in an inconsistent situation where the currentPage > totalPages
To correct this, the current page number is specified via the pager.page (n) method, but this automatically restarts a databound that is not necessary.
Any solution ?