Set the grid in the same position as before clearAndLoad

I from time to time (to sync the DB) have to refresh the dhtmlxgrid.

How can I position the grid (the pagingMode is not enabled) to the approximate same position visually as before the reload?

I say approximate because a record may have been added or deleted but not much more between reloads?

So if the user was viewing from rowIdx 25 to rowIdx 45 (let’s say) before the reload, he should be presented the same region of the grid afterwards.

Please, try to use the following solution:

scroll=mygrid.objBox.scrollTop mygrid.clearAll() mygrid.load(url,function(){ mygrid.objBox.scrollTop=scroll })

Sematik, thanks, seems to work, if I make sure resetting the scroll is done once the whole grid is loaded.

Unfortunately, there is no special solution for the situation, when the scrolling is not finished.