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 can I access rows outside eventlistener?

Hi, I need to get hasCheck for a certain row, but how can I access the row information outside the eventlistener for the view?

When accessing it inside the eventlistener I just use

section.rows[index].hasCheck
tableView.addEventListener('click',function(e){
        // event data
        var index = e.index;
        var section = e.section;

        setTimeout(function(){
        // reset checks
        for (var i=0;i<section.rows.length;i++){
            section.rows[i].hasCheck = false;
            section.rows[i].color = '#000';
        }
        // set current check
        section.rows[index].hasCheck = true;
        section.rows[index].color = '#336699';
        },250);
    });    

}

Thanks

— asked May 26th 2010 by Mattias Svedhem
  • hascheck
  • iphone
  • mobile
  • tableview
0 Comments

2 Answers

  • Accepted Answer

    found it.
    http://developer.appcelerator.com/question/3831/is-there-a-way-to-target-the-rows-created-by-createtableview

    — answered May 26th 2010 by Mattias Svedhem
    permalink
    0 Comments
  • I know this wasn't possible at one point but that was months ago, I'd be interested in this answer too if anyone can chime in.

    — answered May 26th 2010 by Ryan Gartin
    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.