Row Color Reverts Back When Scrolling

Hello,

I have a shopping list set up where the user can swipe to “cross off” items on the list.  But when the user scrolls and comes back, the items have reverted back to the original color. 

How do I make the color stay active until the user swipes again? 

I am using the TableView and an event listener.  The listener is listening for a swipe right to change the row color to green and a swipe left to change back to white.  Everything works until you scroll up or down far enough that the row moves off the screen.  Once you scroll back, the once green row is back to default white. 

Hi Dave,

Could you compile this into a test project and submit a bug report? It might be an issue with the widget… an official report will put it before the engineers and get a fix if necessary.

Thanks,

Brent

Dave,

Are you updating your data source once an item has been “crossed off”? As you scroll away from view and then scroll back the row is getting re-rendered. Your OnRender listener is possibly accessing the original data which isn’t crossed off. Perhaps you might want to consider updating the data source (ie sqlite db, local file etc) and keep a new field to track items that are crossed off and then update this field in your swipe listener. Then you would program your tableView.Insert to use the right background colors etc.

Let me know if I’m off base and I’ll try again. All the best! 

Kerem

ksan --that was it.  Thanks.  

I knew the text in each row was re-rendered during the scroll but didn’t realize the background was as well. 

Great going! Glad this one is sorted out for you. All the best. 

Hi Dave,

Could you compile this into a test project and submit a bug report? It might be an issue with the widget… an official report will put it before the engineers and get a fix if necessary.

Thanks,

Brent

Dave,

Are you updating your data source once an item has been “crossed off”? As you scroll away from view and then scroll back the row is getting re-rendered. Your OnRender listener is possibly accessing the original data which isn’t crossed off. Perhaps you might want to consider updating the data source (ie sqlite db, local file etc) and keep a new field to track items that are crossed off and then update this field in your swipe listener. Then you would program your tableView.Insert to use the right background colors etc.

Let me know if I’m off base and I’ll try again. All the best! 

Kerem

ksan --that was it.  Thanks.  

I knew the text in each row was re-rendered during the scroll but didn’t realize the background was as well. 

Great going! Glad this one is sorted out for you. All the best.