vecino Well-Known Member Licensed User Longtime User Jun 4, 2020 #1 Hi, how can I find out which column the user has clicked on? I can do this by going through all the columns and comparing the column title, but I guess there is something better. Thank you.
Hi, how can I find out which column the user has clicked on? I can do this by going through all the columns and comparing the column title, but I guess there is something better. Thank you.
M Mahares Expert Licensed User Longtime User Jun 4, 2020 #2 vecino said: how can I find out which column the user has clicked on? Click to expand... Code: Copy Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long) Log($"column name: ${ColumnId}"$ ) End Sub Upvote 0
vecino said: how can I find out which column the user has clicked on? Click to expand... Code: Copy Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long) Log($"column name: ${ColumnId}"$ ) End Sub
vecino Well-Known Member Licensed User Longtime User Jun 4, 2020 #3 I didn't ask the right question. I want to know the number of the column. Upvote 0
M Mahares Expert Licensed User Longtime User Jun 4, 2020 #4 vecino said: I want to know the number of the column. Click to expand... Code: Copy Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long) Dim c As B4XTableColumn = B4XTable1.GetColumn(ColumnId) Dim index As Int = B4XTable1.Columns.IndexOf(c) Log(index) '0 or 1 or 2, etc End Sub Upvote 0
vecino said: I want to know the number of the column. Click to expand... Code: Copy Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long) Dim c As B4XTableColumn = B4XTable1.GetColumn(ColumnId) Dim index As Int = B4XTable1.Columns.IndexOf(c) Log(index) '0 or 1 or 2, etc End Sub
vecino Well-Known Member Licensed User Longtime User Jun 4, 2020 #5 Perfect. Thank you very much. Upvote 0