Hi All,
by default the cell selection is by row. Using below changes to selection by cell.
With the mouse or arrow keys the single cell is displayed
Question: How to get the value of the selected single cell by using mouseclick or using arrow keys?
I tried:
but as expected the content of the whole row is returned.
then
but again the whole row is returned although the single cell is shown as selected.
Looked up further for JavaAPI methods, but could not find a solution.
Appreciate any hints. Testproject attached.
by default the cell selection is by row. Using below changes to selection by cell.
B4X:
Dim JO As JavaObject = tableview1
Dim JO2 As JavaObject = JO.RunMethod("getSelectionModel", Null)
JO2.RunMethod("setCellSelectionEnabled", Array As Object(True))
With the mouse or arrow keys the single cell is displayed
Question: How to get the value of the selected single cell by using mouseclick or using arrow keys?
I tried:
B4X:
tableviewMonth_SelectedRowChanged
then
B4X:
Dim JO As JavaObject = tableview1
Dim JO2 As JavaObject = JO.RunMethod("getSelectionModel", Null)
Dim r() As Object = JO2.RunMethod("getSelectedItem", Null)
For i = 0 To r.Length - 1
Log(r(i))
Next
Looked up further for JavaAPI methods, but could not find a solution.
Appreciate any hints. Testproject attached.