I'm tring to pass the corresponding rowUniqueID of clicked row in ABMTable to another page.
But from the Table_Clicked Event: PassedRowsAndColumns don't return the rowUniqueID.
Snippet of codes below:
Load data in ABMTable:
B4X:
Dim table As ABMTable
table.Initialize(page, "Table", True, False, True, "tableTheme")
table.SetHeaders(tableHeaders)
table.IsBordered = True
For i = 0 To database.Size-1
Dim dbRow As List = database.Get(i)
table.AddRow(i, dbRow) '<-----------------uniqueID is set here
Next
Where i want to get row ID:
B4X:
Private Sub Table_Clicked(PassedRowsAndColumns As List)
Dim cell As ABMTableCell = PassedRowsAndColumns.Get(0)
If cell.Column = 0 Then
Dim rowID As Object = cell.RowUniqueId '<-------Return empty string
ABMShared.NavigateToPage(ws, "", "../DetailsPage/?SelectedID="&rowID)
End If
End Sub
RowUniqueID is only available for an ABMTableMutable, not for ABMTable. As ABMTable is not 'changeable', the rows are in the order you added them. so get get back RowId as an int, not a RowUniqueID. Is historically grown as ABMTableMutable did not exist at first and I did not want to break code.