Access to each row in widget tableView list

I created a tableView list.
After list complete creation, I want to access each row in this list ,and to update all its “row.name” values.
How can I do it?
The code:

local function onRowRender( event )
local group = event.view
local row = event.target

local image2 = display.newImage (“assets/images/rate.png”)
group:insert(image2)

row.starObj = image2
row.name = data[event.index].user_id

end

for i=1, #data do
list:insertRow{
id = “unique-row-id”,
onRender = onRowRender,
listener = listListener
}
list = widget.newTableView{
} [import]uid: 144261 topic_id: 29457 reply_id: 329457[/import]

I’m not sure you can access the row.name from outside the onRender/onEvent functions. But why not create a table and use that instead of event.target? That way you can access the row-content from anywhere [import]uid: 14018 topic_id: 29457 reply_id: 118280[/import]

@Mitaten actually , when user presses on some row, I need to update “isVisible” property of image2 in each row to the new value (“true”/“false”). So I have to access the image2 object of each row in some way.
Do you mean to save in the extern table the memory addresses of all image2 objects with its creations? It really could be a good idea if I understood you correctly. [import]uid: 144261 topic_id: 29457 reply_id: 118282[/import]

Create a table outside of the onRender function, then simply replace row.name with table[id], where id being a number you add +1 to for every row you create

that way, if you want to access for example the row.name in your third row in the list, you simply do table[3].isVisible = false

And if you want to update the isVisible of all rows you can simply iterate through the table and flip on/off the isVisible property

Hope I’m making sense, brain cells aren’t top shape right now :-p [import]uid: 14018 topic_id: 29457 reply_id: 118286[/import]

list.content.rows is a table that contains all the rows.

list.content.rows[4] would get you the display group for that row.

row = list.content.rows[5]
row.name = “fred”

[import]uid: 19626 topic_id: 29457 reply_id: 118316[/import]

@robmiracle thanks, it’s great [import]uid: 144261 topic_id: 29457 reply_id: 120530[/import]

@robmiracle thanks, it’s great [import]uid: 144261 topic_id: 29457 reply_id: 120531[/import]

@Mitaten I really implemented this your idea in my project, and it works fine. thanks [import]uid: 144261 topic_id: 29457 reply_id: 120532[/import]

@robmiracle thanks, it’s great [import]uid: 144261 topic_id: 29457 reply_id: 120530[/import]

@robmiracle thanks, it’s great [import]uid: 144261 topic_id: 29457 reply_id: 120531[/import]

@Mitaten I really implemented this your idea in my project, and it works fine. thanks [import]uid: 144261 topic_id: 29457 reply_id: 120532[/import]