This example shows how to modify the table data. When the user clicks on a cell we show an input dialog and let the user modify its content.
The data in B4XTable is stored in an in-memory database. The table name is 'data' and the column names are available with B4XTableColumn.SQLID.
The code to update a cell:
B4X:
B4XTable1.sql1.ExecNonQuery2($"UPDATE data SET ${column.SQLID} = ? WHERE rowid = ?"$, Array As String(InputTemplate.Text, RowId))
When the window is closed the updated data is saved in a CSV file.
This is a B4J example, however it should be trivial to port it to B4A or B4i.
More advanced editable table: https://www.b4x.com/android/forum/threads/b4x-cross-platform-editable-b4xtable-form-example.104766/
Attachments
Last edited: