I want to show selected value in listpicker.
Location": [
{
"id": "208",
"Name": "Canberra"
},
{
"id": "209",
"Name": "Regional ACT"
},
{
"id": "67",
"Name": "NSW"
},
{
"id": "134",
"Name": "CBD, Inner West & Eastern Suburbs"
}
],
I'm convert this data to list.Now I want to show selected location to listpicker
foreach (var Seletedloc in _lst)
{
lstLocations.SelectedItem = Seletedloc ;
}
But I get this error .SelectedItem must always be set to a valid value