Pravee7094 Active Member Jan 9, 2021 #1 Hi all, I used three Edit Text and one spinner to retrieve the Data. The Edit Text is worked perfectly. But the spinner didn't I attached the code snippets B4X: Copy name1 = SelectItem.Get("name") email1 = SelectItem.Get("email") city1 = SelectItem.Get("city") district1 = SelectItem.Get("district") Here I store the values in strings [NOTE : name,email,city are edit text field district is spinner field] Here I retrieve the data B4X: Copy If menuItem.Status = "U" Then edtName.Text = menuItem.name1 edtEmail.Text = menuItem.email1 edtCity.Text = menuItem.city1 Dim spinnertext As String = Spinner1.SelectedItem spinnertext = menuItem.district1 End If Here all Edit Text Field retrieve the data perfectly. The spinner is did not retrieve the data. And the "SelectedItem" is read only, so How can I retrieve the data using spinner? Anybody Help? Thanks Praveen
Hi all, I used three Edit Text and one spinner to retrieve the Data. The Edit Text is worked perfectly. But the spinner didn't I attached the code snippets B4X: Copy name1 = SelectItem.Get("name") email1 = SelectItem.Get("email") city1 = SelectItem.Get("city") district1 = SelectItem.Get("district") Here I store the values in strings [NOTE : name,email,city are edit text field district is spinner field] Here I retrieve the data B4X: Copy If menuItem.Status = "U" Then edtName.Text = menuItem.name1 edtEmail.Text = menuItem.email1 edtCity.Text = menuItem.city1 Dim spinnertext As String = Spinner1.SelectedItem spinnertext = menuItem.district1 End If Here all Edit Text Field retrieve the data perfectly. The spinner is did not retrieve the data. And the "SelectedItem" is read only, so How can I retrieve the data using spinner? Anybody Help? Thanks Praveen
M Mahares Expert Licensed User Longtime User Jan 9, 2021 #2 Pravee7094 said: Here all Edit Text Field retrieve the data perfectly. The spinner is did not retrieve the data. Click to expand... Suppose you already populated the spinner with districts, to select a given district, you use the Spinner1_ItemCLick event: Your code snippets are a little confusing, so this is based on my iffy understanding of what you are trying to do. Code: Copy Private spinnertext As String 'in Globals sub Code: Copy Sub spinner1_ItemClick (Position As Int, Value As Object) spinnertext =Value End Sub Upvote 0
Pravee7094 said: Here all Edit Text Field retrieve the data perfectly. The spinner is did not retrieve the data. Click to expand... Suppose you already populated the spinner with districts, to select a given district, you use the Spinner1_ItemCLick event: Your code snippets are a little confusing, so this is based on my iffy understanding of what you are trying to do. Code: Copy Private spinnertext As String 'in Globals sub Code: Copy Sub spinner1_ItemClick (Position As Int, Value As Object) spinnertext =Value End Sub