25 Apr 2012 8:12 AM #1
Unanswered: How can I retrieve the same scroller position on grid after refresh or reload event
I have an infinite-scroller grid, which has new bunch of data after every 10 seconds. If the user is looking at some rows at this grid, it will lost the previous position when new chunk of data will arrive (whether it adds on the top of the grid or on the bottom, mostly it adds on the top, based on the sorting applied on the grid). Now I want to retain the previous position of the grid after the reload, i tried using the scrollByDeltaY() method of grid after refresh event, to take the scroller back to the original position but it did not show me the same rows on that position. I can not also save the row index etc as the rows are not selectable. I only want to achieve it for vertical scroll.
Is there any way of achieving it? I have tried so long but did not get any success. Any help regarding this will be highly appreciated.
1 May 2012 7:04 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
You need to get the offset of the record before and the also after and use the new offset.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
22 Mar 2013 5:22 AM #3
I have the same problem, can you write example?