View Full Version : How to stay on the same page after grid refresh

15 Jul 2013, 12:47 AM

is there any way to stay on the same page after the grid is reloaded? Currently, if I am on the page 5 and make call to refresh the grid list, I'll jump to the first page. Any way to controll it?

thanks and regards,

15 Jul 2013, 1:30 AM
Usually this information is already passed on the call to refresh the data (start and limit parameters).

You simply need to handle these on the server side as you would during a normal page change.

15 Jul 2013, 2:36 AM
This means I need to set the start/limit params ath the server side before the response is returned?

15 Jul 2013, 5:17 AM
How are you currently handling paging?

Clicking "next" or "previous" will send "Start" and "Limit" parameters, which you should be using server side to determine what results to return from the database. Clicking "refresh" passes these exact same parameters, so should be handled in the same way as clicking "Next" or "Previous".

16 Jul 2013, 4:24 AM
Well, I don't use the refresh button on the pagination toolbar. I have own button defined in tbar which is used to refresh the list. on click follwing funcion is called:

function reloadGridData() {
ds.load( {
params : {
id : Math.random(),
start : 0,
limit : maxRecordPerPage

This function is not called via refresh button only but also each time I close a "preview" window.


I suppose this is the problem caus start parameter is 0. is there any other way to do that?

16 Jul 2013, 4:43 AM
Have you tried simply calling store.reload()?

This will perform a load call with identical params as sent on the previous load function.


16 Jul 2013, 5:58 AM
Thanks willigogs! It does work ;-).