B4X:
[{"Years":2009,"Term":"I"},{"Years":2009,"Term":"II"}]
B4X:
how can i modify this spinner
which has a table years with columns Years,Term
currently i have this one which shows only one column
Sub InitSpinners
Private i As Int
Private Query1 As String
Private Curs As Cursor
Query1 = "SELECT DISTINCT Years FROM Years ORDER BY Years ASC"
Curs = Starter.SQL1.ExecQuery(Query1)
'we add 'no filter' as no selection
spnFirstName.Clear
spnFirstName.Add("Select from the List...")
'we fill the Spinner with the data from the database
For i = 0 To Curs.RowCount - 1
Curs.Position = i
'spnFirstName.Add(Curs.GetString("Account"))
spnFirstName.Add(Curs.GetString("Years"))
'Dim kk As String = Curs.GetString("Names")
'Log(kk)
Next
'spnFirstName.RemoveAt("Select from the List...")
Curs.Close
End Sub