accessing 'row' data from a tableview list

Using the list view example below…

I’m wondering how I can access data from ‘row’ when I press on that row in the list. I can get the row number as per the example, but the data I am building the list from has other values that I would like to alter (on the screen that slides in) and then pass back and have the list update. I can’t even do the first part (pass other data from the row to the view for that row!)

http://developer.coronalabs.com/content/list-view-3

Can anyone help?

Hi @jolley.chris,

The link you have is in reference to a very old, now-unsupported set of code. Do you perhaps want to use the current TableView?

http://docs.coronalabs.com/api/library/widget/newTableView.html

Brent

That explains an awful lot!!

Many thanks, I’ll try to move forwards with the “new” widget.  

Ah… can I still put other elements into each row?

Using the older code, I could add a new display group to each row, containing various elements - images, buttons, text, etc.

Can this sort of thing still be achieved?

Also, can the rows have no background colour (ie transparent)?

Hi @jolley.chris,

Yes, you can definitely add custom content to rows, make the rows transparent, etc. I’ll be publishing an updated tutorial on this in the near future, but probably the best way is for you to follow the documentation and the sample project located in your local Corona application directory (CoronaSDK > SampleCode > Interface > WidgetDemo).

Best regards,

Brent

Hi @jolley.chris,

The link you have is in reference to a very old, now-unsupported set of code. Do you perhaps want to use the current TableView?

http://docs.coronalabs.com/api/library/widget/newTableView.html

Brent

That explains an awful lot!!

Many thanks, I’ll try to move forwards with the “new” widget.  

Ah… can I still put other elements into each row?

Using the older code, I could add a new display group to each row, containing various elements - images, buttons, text, etc.

Can this sort of thing still be achieved?

Also, can the rows have no background colour (ie transparent)?

Hi @jolley.chris,

Yes, you can definitely add custom content to rows, make the rows transparent, etc. I’ll be publishing an updated tutorial on this in the near future, but probably the best way is for you to follow the documentation and the sample project located in your local Corona application directory (CoronaSDK > SampleCode > Interface > WidgetDemo).

Best regards,

Brent