Titanium Community Questions & Answer Archive

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

How to keep selected TableRow in view (and selected)

I have a TableView with a height of 100%. At onclick of a row, I move a view from below up and shorten the height of the TableView.

But when this happens… the selected row loses focus and if it is a lower row.. can be lost from view..

is there any way to keep the row selected and in view?

— asked November 28th 2010 by Critter
  • tableview
  • view
0 Comments

2 Answers

  • have you tried just reselecting the row?

    tableview.addEventListener('click', function(e)
    {
       // do your stuff
    
       // reselect the row
        tableView.selectRow(e.index);
    });
    
    — answered November 28th 2010 by Aaron Saunders
    permalink
    0 Comments
  • Bloody selectRow isn't doing it..not sure why..

    scrollToIndex pulls it into sight though.. so that's halfway sorted lol

    — answered November 28th 2010 by Critter
    permalink
    0 Comments
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.