Forum Xamarin.Android

Spinner with key value.


Can you please help me how do i make drop-down control with key value pair, same as used in

I am used Xamarin.Android Navtive app.



  • ArvindrajaArvindraja INMember ✭✭✭

    use this code automatic values associate with each item according to the number position i think index start from 0

                    private void spinner_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e)
                        var spinner = (Spinner) sender;
                        SelectedCategory = string.Format("{0}", spinner.GetItemAtPosition(e.Position));
  • SanjayTejaniSanjayTejani USMember ✭✭✭


    I want to get Id from Spinner.

    Name = test 1, Id=102
    Name = test 2, Id=103
Sign In or Register to comment.