luke2012 Well-Known Member Licensed User Longtime User Mar 27, 2012 #1 Hi to all! there is a way to display in a spinner view a couple of values but only one of the couple visible to the user ? Thanks in advance !
Hi to all! there is a way to display in a spinner view a couple of values but only one of the couple visible to the user ? Thanks in advance !
Erel B4X founder Staff member Licensed User Longtime User Mar 27, 2012 #2 Not sure what do you mean... Upvote 0
luke2012 Well-Known Member Licensed User Longtime User Mar 27, 2012 #3 Solutions I try to explain better : I have a spinner with values loaded from a column table (SQLite db). Example : "WolksWagen Golf" "Fiat Punto" "BMW Series 3" I need to known the record Id (int) of the value selected from user using the spinner. So my idea of possible solutions is : 1) I load 2 colums in the spinner : "WolksWagen Golf" | 1 *** The value at the right (1) if the pipe should be hidden 2) When I load the value from the table a store the two colums "text" and Id in array structure in order to lookup the string and known the Id value of the record stored in the array. 3) Doing a query in the db and lookup the index value I need. Upvote 0
Solutions I try to explain better : I have a spinner with values loaded from a column table (SQLite db). Example : "WolksWagen Golf" "Fiat Punto" "BMW Series 3" I need to known the record Id (int) of the value selected from user using the spinner. So my idea of possible solutions is : 1) I load 2 colums in the spinner : "WolksWagen Golf" | 1 *** The value at the right (1) if the pipe should be hidden 2) When I load the value from the table a store the two colums "text" and Id in array structure in order to lookup the string and known the Id value of the record stored in the array. 3) Doing a query in the db and lookup the index value I need.
Erel B4X founder Staff member Licensed User Longtime User Mar 28, 2012 #4 You should use a Map object. It will allow you to map the spinner items text to the additional data. Upvote 0