How to update values on a cell SQLite db with TableView extension

Hi. I want to know if is possible to edit a value on a cell, retriveing data from a table SQLite, like a UPDATE sql clause. I have a list view that is populated with data from table (it´s possible use the TableView extension or simple listview) and a button to update one cell (anyone). This is possible? Click on value to edit, and next save the altered data on db? For now thanks a lot. Follow my blocks. Some things (like the button to update the value, and a SQL select to populated de db on a ListView or TableView extension, are still being made).

  • Select the row in the Tableview you want to edit
  • Using the TableView onClick event:
    • Assign the row cells to labels(primary key) and textboxes (editable cells)
  • Edit the record as required
  • Run the UPDATE command to update your sqlite db, using the values in the labels and textboxes for the fields in the record
  • Reload the TableView with the updated data from sqlite db with a SELECT query

Man… thank´s a lot for your reply. But can you help me show how to add this on blocks:
Using the TableView onClick event:
Assign the row cells to labels(primary key) and textboxes (editable cells)

I find the TableView onClick event, but I try to separate the values (id, name, value, quantity) for each textbox to edit the data, but nothing works for me! Can you help me? For now thanks!

You may not need the single quotes for the data.

1 Like