Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Selected ListView Item

$
0
0

I am trying to get a listview selected item to work. I am trying to see if I can pass the selected value to a wcf and query the database from a selected county to a town. I am just wondering how I can do this?

Here is my onitem click event that I am building at the minute:

        public void OnItemClick(AdapterView parent, View view, int position, long id)
    {
        //whatever you need it to do goes here.
        //var t = holder[position];
        //Android.Widget.Toast.MakeText(this, t, Android.Widget.ToastLength.Short).Show();
        var selectedvalue = SimpleListItem1[parent];
        var Intent = new Intent(this, typeof(SelectLocationActivity));
        Intent.PutExtra("{0}", selectedvalue.ToString());
        StartActivity(Intent);
    }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>