I know this is one way to set , how to get value ?????? or how to set styles of one cell????
B4X:
Sub setValue(xtable As B4XTable, xRow As Int, xCol As Int, xValue As String)
Dim colName As String = nameDays(xCol)
Dim column As B4XTableColumn = xtable.GetColumn(colName) '----> also, can this be a number instead a name ID?
xtable.sql1.ExecNonQuery2($"UPDATE data SET ${column.SQLID} = ? WHERE rowid = ?"$, Array As String(xValue, xRow))
xtable.Refresh
End Sub
Sub Button1_Click ()
Dim row As Int = 5 'row 5 ...
Dim value As String = GetCellValueandSetColor("Name", row, xui.Color_Green)
Log(value)
End Sub
Sub GetCellValueandSetColor(columnID As String, rowID As Int, color As Int) As String
Dim column As B4XTableColumn = B4XTable1.GetColumn(columnID)
'For i = 1 To column.CellsLayouts.Size -1 ' to loop thru all rows in Column ... replace (rowID) in line below.
Dim pnl As B4XView = column.CellsLayouts.Get(rowID)
pnl.GetView(0).TextColor = xui.Color_Green
Return pnl.GetView(0).text
'Dim lbl As Label = pnl.GetView(0) ... non B4X style
End Sub
Sub Button1_Click ()
Dim row As Int = 5 'row 5 ...
Dim value As String = GetCellValueandSetColor("Name", row, xui.Color_Green)
Log(value)
End Sub
Sub GetCellValueandSetColor(columnID As String, rowID As Int, color As Int) As String
Dim column As B4XTableColumn = B4XTable1.GetColumn(columnID)
'For i = 1 To column.CellsLayouts.Size -1 ' to loop thru all rows in Column ... replace (rowID) in line below.
Dim pnl As B4XView = column.CellsLayouts.Get(rowID)
pnl.GetView(0).TextColor = xui.Color_Green
Return pnl.GetView(0).text
'Dim lbl As Label = pnl.GetView(0) ... non B4X style
End Sub