I populate a spinner from a table of a database.
The table has two fields, id and name. In spinner we can see only the items of the column 'name'.
I want when an item is selected in spinner to get the id. (as you understand the table 's id is not the same with spinner 's SelectionIndex).
So, I was thinking, is there some way to add the column 'id' (as a hidden column) of the table in spinner? So that it 'l be very easy to get the id?
Here is how it can be done using Taifun's sqlite extension, and without dictionaries (though they have their place...), plus some trickery on the spinner so that you can select the first item!
(using companion)