Hi there
Whenever I modify the query with my RadGrid, I might get into a situation where the current page the user is viewing is no longer there (ie. page 15 out of 10).
I currently perform a check in the RadGrid's PreRender event, to see it the actual PageIndex+1 is higher that the PageCount, in which case I set the new PageIndex to 0 (or PageCount-1 depending on what I am trying to achieve). This however seems a bit like a hack, and I would appreciate some other, more elegant solution.
The first thing that popped into my mind was a PageCountChanged event perhaps? We already have PageIndexChanged and PageSizeChanged, but not PageCountChanged.
Any ideas/solutions?
EDIT: Whoops... I just found out that my own "solution" didn't even work as I expected. A correct solution would now be _very_ much appreciated! :)
Whenever I modify the query with my RadGrid, I might get into a situation where the current page the user is viewing is no longer there (ie. page 15 out of 10).
I currently perform a check in the RadGrid's PreRender event, to see it the actual PageIndex+1 is higher that the PageCount, in which case I set the new PageIndex to 0 (or PageCount-1 depending on what I am trying to achieve). This however seems a bit like a hack, and I would appreciate some other, more elegant solution.
The first thing that popped into my mind was a PageCountChanged event perhaps? We already have PageIndexChanged and PageSizeChanged, but not PageCountChanged.
Any ideas/solutions?
EDIT: Whoops... I just found out that my own "solution" didn't even work as I expected. A correct solution would now be _very_ much appreciated! :)