1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    14
    Vote Rating
    0
    rickyclegg is on a distinguished road

      0  

    Default Reset List scroll position to top

    Reset List scroll position to top


    I have an Ext.List that is binded to a data store. I regularly change the data in the store. if there is a lot less items in the list. it retains the previous scroll position so you cannot see anything.

    So whenever I change the data that is displayed. I wish to set the scroll position of the list back to the top. But I cannot find a scroller property on the list of the equivalent.

    Any help would be great.

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Location
    Lincoln, UK
    Posts
    27
    Vote Rating
    0
    BenMajor is on a distinguished road

      0  

    Default


    The scroller object belongs to the Panel to which the List belongs. As a result, after updating your DataStore, try calling the following method:

    Code:
    PanelRef.scroller.scrollTo({ x: 0, y: 0 })
    Obviously updating PanelRef to represent the container for the list.

    HTH,
    Ben.

  3. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    14
    Vote Rating
    0
    rickyclegg is on a distinguished road

      0  

    Default


    I have tried adding PanelRef.scroller.scrollTo({ x: 0, y: 0 }) to the code. It always says that the "scroller" property is undefined. But I know that is is rendered as I can see it on screen.

    Any ideas why my list doesn't have a scroller property?

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    14
    Vote Rating
    0
    rickyclegg is on a distinguished road

      0  

    Default


    my exact line is.

    this.configuratorSelectionList.scroller.scrollTo({ x: 0, y: 0 });

    So I have changed out panel ref and and everything. But when I pause in Firebug scroller is undefined.

  5. #5
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    557
    Vote Rating
    31
    Kurt001 has a spectacular aura about Kurt001 has a spectacular aura about

      0  

    Default


    Hi

    I had the same problem and until no one comes up with a better idea, here is my solution:

    list.doComponentLayout();

    Best Kurt

  6. #6
    Sencha User
    Join Date
    Jan 2011
    Posts
    14
    Vote Rating
    0
    rickyclegg is on a distinguished road

      0  

    Default


    Thank you for the replies. Like all great bugs it was my own fault. The list was always set to full size and was a child of a panel with a toolbar that did all the scrolling. So the scroller property was on the panel object. So I simply reset the scrolling on that item.

    Thanks

  7. #7
    Sencha User
    Join Date
    Sep 2011
    Location
    Vicenza, Veneto, Italy
    Posts
    18
    Vote Rating
    0
    MPeg is on a distinguished road

      0  

    Lightbulb


    Hi, here is another thread in this forum about this issue:
    http://www.sencha.com/forum/showthre...816#post718816

    Here you can find a little how-to that reassume proposed solutions:
    http://goo.gl/f7oVY

    Bye!
    MPeg
    Follow my blog at: MovableApp.com!
    http://twitter.com/#!/movableapp - My Sencha Touch Learning Experience

  8. #8
    Sencha User
    Join Date
    Mar 2010
    Posts
    33
    Vote Rating
    0
    yerajeff is on a distinguished road

      0  

    Default My Solution

    My Solution


    Here is how I solved the problem just incase anyone views this thread:

    PHP Code:
    Ext.getCmp('componentId').getScrollable()._scroller.scrollTo(0,0); 

Similar Threads

  1. [OPEN] [FIXED-212] List not reducing scroll position after reload
    By meyerovb in forum Sencha Touch 1.x: Bugs
    Replies: 4
    Last Post: 31 Jan 2012, 10:34 PM
  2. Reset list scroll position to top
    By jacstofberg in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 31 Jan 2012, 10:22 PM
  3. Access the scroll event/position in a list
    By aaron.malenfant in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 27 Jan 2012, 5:05 AM
  4. List Scroll end position
    By Shijutv in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 20 Dec 2010, 6:40 AM
  5. Open tab will reset scroll position when unfocused.
    By mscifo in forum Ext 1.x: Bugs
    Replies: 4
    Last Post: 7 Dec 2006, 11:03 AM

Thread Participants: 4

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar