Hello,
I have been working with B4A for a while and I am converting one of my applications to use Pages. Everything is working fine except that I want to replace an HTML table in a webview with a Table view. I have looked at the tutorial and everything looks straightforward except that I can't see any way to set an ID/key value for a row. I am populating the table with database rows and each row has a unique ID. When a user taps a row in the table, I need to capture the ID value of that row. Grabbing one of the displayed values does not do me any good. Is there any way to set an ID value on a row so that I can then grab that value and use it to query my database? The row ID value seems to be set by B4A and I cannot see how to relate it to my database.
Example:
Data table:
ID Name Job
1 Fred Developer
2 Bill Pilot
3 Jane Fire fighter
4 Bill Engineer
I want my table to display only the names and jobs but when a user taps on the name, I want to get the ID. Using a map doesn't work because it is possible that the Name value is not unique. Any suggestions?
Assuming that the RowID set by B4A always starts with 1, increments by one and the assigned row ID does not change if the sort order is changes, I could use a map. Every time I add a row to the list, I could maintain a separate map with an index combined with my ID value. Would that work or am I missing something?