1. #1
    Sencha User SabaSarwat's Avatar
    Join Date
    Sep 2010
    Posts
    70
    Vote Rating
    0
    SabaSarwat is on a distinguished road

      0  

    Default Unanswered: How can I retrieve the same scroller position on grid after refresh or reload event

    Unanswered: How can I retrieve the same scroller position on grid after refresh or reload event


    Hi all,

    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.

    Regards,
    Saba

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,602
    Answers
    3448
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You need to get the offset of the record before and the also after and use the new offset.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    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 services@sencha.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.

  3. #3
    Sencha User
    Join Date
    Feb 2013
    Posts
    5
    Answers
    1
    Vote Rating
    0
    slan is on a distinguished road

      0  

    Default


    mitchellsimoens,
    I have the same problem, can you write example?