Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Scroll to section top

Hello, just wondering how you scroll to the top of a tableviewsection. I have 2 section and sometimes I need to scroll to the second section which is way down the scroll. How do you do it?

— asked November 1st 2010 by Matt Hebs
  • scroll
  • sectionscroll
  • tabeviewsection
  • tableview

1 Answer

  • Titanium.UI.TableView.scrollToIndex() scrolls to a row index. I am not sure it's possible to scroll to a section. Would it be feasible for you to determine the first row in a section, and scroll to its index instead?

    An iphone-only feature is to pass constants to scrollToIndex, as follows:


    There is more information about it in the docs and you can see it in action in the KitchenSink in table_view_row_insert.js

    — answered November 5th 2010 by Paul Dowsett
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.