This is a follow up from the post: B4XTable - all rows and no header
https://www.b4x.com/android/forum/threads/b4xtable-all-rows-and-no-header.103519/
Quoting Erel:
"I'm pretty sure that you can do it without modifying the B4XTable code."
I think you can but than it looks to me you it wouldn't be the most efficient way.
The minimum change needed to the class (to make it run most efficient) would be to make the variable CountAll public. Then you could do in the provided example:
https://www.b4x.com/android/forum/t...ortable-searchable-customizable-table.102322/
In Main:
RBS
https://www.b4x.com/android/forum/threads/b4xtable-all-rows-and-no-header.103519/
Quoting Erel:
"I'm pretty sure that you can do it without modifying the B4XTable code."
I think you can but than it looks to me you it wouldn't be the most efficient way.
The minimum change needed to the class (to make it run most efficient) would be to make the variable CountAll public. Then you could do in the provided example:
https://www.b4x.com/android/forum/t...ortable-searchable-customizable-table.102322/
In Main:
B4X:
Sub Globals
Private lRowID As Long '<<<< added
'etc.
End Sub
Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long)
Dim RowData As Map = B4XTable1.GetRow(RowId)
Dim cell As String = RowData.Get(ColumnId)
'This is the SQLite ROWID of the underlying table, corresponding with the clicked row and we can use this to delete a row
lRowID = RowId '<<<< added
Activity.Title = cell
End Sub
Sub btnDeleteRow_Click
B4XTable1.sql1.ExecNonQuery2("delete from data where rowid = ?", Array As String(lRowID))
B4XTable1.CountAll = B4XTable1.CountAll - 1
B4XTable1.Refresh
End Sub
RBS