I have a situation which is a bit hard to explain but the following is the concept:
I have an app that loads data from sqlite. The user can then perform updates on the database. I have a spinner control used to load values .The spinner will load the value saved in, say, customer table. I want when the user clicks on the spinner, he should be able to get all values (saved in category table) and select a value then update the database. The following is my code
I have tried using SpinCategory_ItemClick to load all category values (which loads the values) but when i click on the spinner, it just selects the first value as SelectedItem. If i select another value, the spinner defaults to first value. Please help
I have an app that loads data from sqlite. The user can then perform updates on the database. I have a spinner control used to load values .The spinner will load the value saved in, say, customer table. I want when the user clicks on the spinner, he should be able to get all values (saved in category table) and select a value then update the database. The following is my code
B4X:
Cursor1 = sql1.ExecQuery("SELECT * FROM customer where code ='" & lblRowid.Text &"'")
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
txtDate.Text=Cursor1.GetString("date")
txtName.Text=Cursor1.GetString("name")
SpinCategory.Add(Cursor1.GetString("category"))
Next