I have an event that loads new data into a grid and therefore I need to tell the grid the page and the sort field that corresponds to the loaded data. How can I set the page and the current sort field of a grid?

To be more specific: I want to add a history to my grid. I'm saving every query the grid shows and have two buttons in the grids toolbar called "back" and "forward". Clicking the "back"-button calls the previous query and loads the data into the grid. Since the page and the sort-field of the previous query might be different I want to set these two parameters of my grid through a function to fit the current used query.

Any ideas?