I would download the latest version, but I can only use version 3.5.2 because I use a new web application framework which comes packaged with jqgrid 3.5.2. So normally I'd have to wait until the framework uses another version of jqgrid, but I think that could take a while. I suppose there is no other “quick fix” I could use until the framework is updated?
I noticed that this bug still happens when you dynamically change the url of the jqgrid.
EDIT: I use jqgrid 3.5.3
I have a button below my jqgrid, which changes the url of the grid to only show a part of the data. So, when you're on page 29/29, and you click the button, you end up on page 29/22, which should be 22/22.
I tried to fix this problem by using the code I posted as a start of this topic, but it doesn't work.
Ah yes, I managed to solve it on server side. I should have thought of this myself.
But it's strange, I thought jqgrid solved this problem by itself, because when you do regular paging and you go from a lower pagesize to a higher pagesize (for example, change pagesize 10 to 30), then jqgrid does solve it by itself: if the current page is greater than the pagesize, the current page gets edited.