Delete row from Business App Sample

I really want to delete a row from the datatable in the Business Sample app Rob made. I found this thread where one programmer did it but i can’t figure out where to place the code he provided ! The thread is here: 

https://forums.coronalabs.com/topic/64942-deleting-a-record-from-the-database-in-corona-sample-app/#entry336532

Looking at his code, he may have put a delete button on a page the tableView row linked to. It didn’t appear that he put it into the tableView row itself.

But what you might want to look at is our CoronaWeather sample app:

https://github.com/coronalabs-samples/CoronaWeather

There are some pretty cool features in particular on the Locations tab (scenes/locations.lua). It demonstrates adding a delete button directly into the row that you swipe left to expose. Now I brute force refresh the whole tableView but it’s a clean way to manage it. It also has a search box that you start typing a location into and after three letters it starts searching a database of locations that keeps filtering down until you get the matches you want, which is also a temporary use of a tableView. That scene has two tableViews in it, so be aware the onRowRender and onRowTouch functions have more specific names for the tableView they are attached to.

Rob

Thanks Rob i will take a look at the Weather app.

Looking at his code, he may have put a delete button on a page the tableView row linked to. It didn’t appear that he put it into the tableView row itself.

But what you might want to look at is our CoronaWeather sample app:

https://github.com/coronalabs-samples/CoronaWeather

There are some pretty cool features in particular on the Locations tab (scenes/locations.lua). It demonstrates adding a delete button directly into the row that you swipe left to expose. Now I brute force refresh the whole tableView but it’s a clean way to manage it. It also has a search box that you start typing a location into and after three letters it starts searching a database of locations that keeps filtering down until you get the matches you want, which is also a temporary use of a tableView. That scene has two tableViews in it, so be aware the onRowRender and onRowTouch functions have more specific names for the tableView they are attached to.

Rob

Thanks Rob i will take a look at the Weather app.