Hi @Informatix
I'm using your jTreeViewExtended library and would like to be able to set and get the records Primary Key value with the TreeItem object.
I see how you've done it in your demo, but I can't get it to correctly format/set the 3 values when building the TreeItems.
Your code:
My code:
My Tree Item display result:
#ID|25|Mark Stuart
What is the correct way to store/set the record ID with the TreeItem but display another fields value for display?
Thanx,
Mark Stuart
I'm using your jTreeViewExtended library and would like to be able to set and get the records Primary Key value with the TreeItem object.
I see how you've done it in your demo, but I can't get it to correctly format/set the 3 values when building the TreeItems.
Your code:
B4X:
'Latitude (format #LAT|rowid|value)
Dim LatItem As TreeItem
Dim LatValue As String = "#LAT|" & Records.GetString("rowid") & "|" & Records.GetString("Latitude")
LatItem.Initialize("", LatValue)
CityItem.Children.Add(LatItem)
'Longitude (format #LNG|rowid|value)
Dim LongItem As TreeItem
Dim LngValue As String = "#LNG|" & Records.GetString("rowid") & "|" & Records.GetString("Longitude")
LongItem.Initialize("", LngValue)
CityItem.Children.Add(LongItem)
My code:
B4X:
Dim item As TreeItem
item.Initialize("", "#ID|" & rs.GetInt("ID") & "|" & rs.GetString("Name"))
parentItem.Children.Add(item)
My Tree Item display result:
#ID|25|Mark Stuart
What is the correct way to store/set the record ID with the TreeItem but display another fields value for display?
Thanx,
Mark Stuart