I’m using this code to find an item by text:
ddlCountry.Items.FindByText("someCountry").Selected = true;
I receive an exception that says the drop down list cant multiselect which sounds reasonable to me. I’m not sure how to refactor the code above to tell it to select only the first item it finds.
Note: It’s a group drop down list with quick picks which is why there is duplicates.
Since
FindByTextonly returns oneListItem, you could try clearing the selection and then your Selected assignment should work: