Titanium Community Questions & Answer Archive

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

TableView - add row dynamically

Hi all,
I have an Android application that can dynamically load data from a webservice and append it to a tableView. That works in 0.8.x without any problem.

I'm doing the migration of my app to 1.0 and I have found some problem with appendRow method. It seems not to work after the tableView is added (initialized) to the current window. Here is the prototype of my code that no longer works in 1.0:

http://pastie.org/878557

— asked March 20th 2010 by Anh Tuan Kieu
  • 1.0
  • android
  • appendrow
  • tableview
1 Comment
  • Hello,
    i am not able to execute the webservice in android.same i had done in iphone n it is working properly.Can u give the sample code how u had load data from a webservice and append it to a tableView.As i have to do the same thing in my project

    — commented July 19th 2011 by shweta dodiya

1 Answer

  • Accepted Answer

    The tableview modification APIs are implemented as of 1.1.0. If you're only adding a few rows your technique is fine. I would recommend that if you're changing a lot of data, you'll get better response building the new data array and using setData on it. It will prevent unnecessary model change events being fired in the native sub-system.

    — answered March 24th 2010 by Don Thorp
    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.