TableView - how to reRender all visible rows immediately?

how can I reRender the whole tableView without user interaction? I’ve tried

list.content.rows[i].reRender = true

but that only works after the list was moved a bit. There must be an easy way out, is’t it? thanks! [import]uid: 53732 topic_id: 33094 reply_id: 333094[/import]

Do a getListPosition() call, it will return the y value and then call the scrollToY() call and pass it the y. That will force a redraw of the table.

You will need to get documentation from one of the later daily builds to see the docs for these two calls. [import]uid: 19626 topic_id: 33094 reply_id: 131468[/import]

Do a getListPosition() call, it will return the y value and then call the scrollToY() call and pass it the y. That will force a redraw of the table.

You will need to get documentation from one of the later daily builds to see the docs for these two calls. [import]uid: 19626 topic_id: 33094 reply_id: 131468[/import]

ok, i will try that. thanks! [import]uid: 53732 topic_id: 33094 reply_id: 132070[/import]

ok, i will try that. thanks! [import]uid: 53732 topic_id: 33094 reply_id: 132070[/import]

Unfortunately it doesn’t work. I tried with the current build. getListPosition() is not a valid function. I tried

[lua]list:scrollToY(list:getContentPosition())[/lua]

instead. This worked with no error, but without redraw of the tableview :frowning:

any ideas? [import]uid: 53732 topic_id: 33094 reply_id: 132399[/import]

Unfortunately it doesn’t work. I tried with the current build. getListPosition() is not a valid function. I tried

[lua]list:scrollToY(list:getContentPosition())[/lua]

instead. This worked with no error, but without redraw of the tableview :frowning:

any ideas? [import]uid: 53732 topic_id: 33094 reply_id: 132399[/import]

Nothing new on this topic? May I do something wrong? Could you please post a little code snippet which makes clear your suggestion?

thanks,
Mike [import]uid: 53732 topic_id: 33094 reply_id: 134225[/import]

Nothing new on this topic? May I do something wrong? Could you please post a little code snippet which makes clear your suggestion?

thanks,
Mike [import]uid: 53732 topic_id: 33094 reply_id: 134225[/import]

try this, it worked for me

local y = list:getContentPosition() list:scrollToY(y,0)

cheers! [import]uid: 74667 topic_id: 33094 reply_id: 134914[/import]

try this, it worked for me

local y = list:getContentPosition() list:scrollToY(y,0)

cheers! [import]uid: 74667 topic_id: 33094 reply_id: 134914[/import]

Didn’t work for me either. Am I correct in thinking this only works for lists, not tableViews? This is my code:

local function getfilelistener(event)     if (event.isError) then         print( "Network error - download failed" )     elseif (event.phase == "began") then         print( "Progress Phase: began" )     elseif (event.phase == "ended") then         if event.response.filename then              print( "loaded image "..event.response.filename )             --force re-render visible             local y2 = tableView:getContentPosition()             print("pos:"..y2)              tableView:scrollToY({y=y2,time=0})         end     end end  

I’m currently looking at passing the onRowRender event as parameter to the network listener and call onRowRender(rowEvent) when phase==“ended”. Would that be correct?

Didn’t work for me either. Am I correct in thinking this only works for lists, not tableViews? This is my code:

local function getfilelistener(event)     if (event.isError) then         print( "Network error - download failed" )     elseif (event.phase == "began") then         print( "Progress Phase: began" )     elseif (event.phase == "ended") then         if event.response.filename then              print( "loaded image "..event.response.filename )             --force re-render visible             local y2 = tableView:getContentPosition()             print("pos:"..y2)              tableView:scrollToY({y=y2,time=0})         end     end end  

I’m currently looking at passing the onRowRender event as parameter to the network listener and call onRowRender(rowEvent) when phase==“ended”. Would that be correct?