I have a question regarding SelectedItem. I have set a combo box for an edit page using xamarin forms.
I have successfully retrieve the data from a collection and bind it in SFComboBox.as a datasasource now my is retrieving the value from database to combobox.
the combobox should display the previous data since it is an edit page. i have tried the SelectedItem but it is not showing in my combobox.
please see the codes below
AllowFiltering="True" SuggestionMode="StartsWith" IsEditableMode="True" >
TextColor="White" SelectedBackgroundColor="#990000"
DeleteButtonColor="Color.Brown" IsCloseButtonVisible="true"
CornerRadius="15" DeleteButtonPlacement="Right">
and this is how i use the selected item
foreach (string laboratory in laboratoryList)
{
if (!string.IsNullOrEmpty(laboratory))
{
cbLaboratory.SelectedItem = laboratory.TrimStart();
}
}
Athe combobox is still empty. i even directly put this cbLaboratory.SelectedItem = "FBS"; but still not working.. is it possible to display multiple selecteditems?