Hi, this is probably a silly question, but I can't find the answer.
If the user clicks on a row of a B4XTable, how can I know which column he clicked on?
In "_CellClicked(ColumnId As String, RowId As Long)" it returns the column name and the row number, shouldn't it be the column number?
B4X:
Private Sub tbLecturas_CellClicked (ColumnId As String, RowId As Long)
Log(ColumnId &" - "& RowId)
End Sub
I see that with this code it shows: c1, c2, c3, etc. depending on the column pressed.
Is it safe to use that method to know the column where the user has tapped?
B4X:
Private Sub tbLecturas_CellClicked (ColumnId As String, RowId As Long)
Dim tc As B4XTableColumn = tbLecturas.GetColumn( ColumnId )
Log( tc.SQLID )
Private Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long)
Dim tc As B4XTableColumn = B4XTable1.GetColumn( ColumnId )
Log( tc.SQLID ) 'In the in memory database table the cols are referred to as c0, c1, c2, etc
Log( tc.id ) 'header name for the given column
Log(tc.Title) 'by default the title is the same as the id. Therefore, tc.id same as tc.Title
End Sub
If you are running a query involving the in memory table which is called data, you have to use c0, c1 and so on