BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
I have added combobox in xamarin form.
<SfPicker:SfComboBox x:Name="GrpBy" DropDownCornerRadius="05" FontAttributes="None" SuggestionMode="Contains" IsEditableMode="true" ShowSuggestionsOnFocus="true"
HeightRequest="40" MultiSelectMode="Token" IsSelectedItemsVisibleInDropDown="False" TextHighlightMode="MultipleOccurrence" HighlightedTextColor="Red"
EnableAutoSize="True">
I retrieved the multiple selected values but now I want to set those selected values again to combobox. Please how to set multiple items to combobox as seleceted items.
Hi Amish,
Query: "Setting Multiple Selected Value In SfComboBox
We have checked the reported query and we can set mutiple selected value using SelectedItem property. We have binded the SelectedItem value using ObservableCollection. We have prepared a sample for your reference. Please get the sample from the attachments. Here is the code snippet:
<SfPicker:SfComboBox x:Name="GrpBy" DropDownCornerRadius="05" FontAttributes="None" SuggestionMode="Contains" IsEditableMode="true" ShowSuggestionsOnFocus="true" DataSource="{Binding EmployeeCollection}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedEmployee, Mode=TwoWay}" HeightRequest="40" MultiSelectMode="Token" IsSelectedItemsVisibleInDropDown="False" TextHighlightMode="MultipleOccurrence" HighlightedTextColor="Red" EnableAutoSize="True"/> |
Please check and let us know if the problem was resolved on your side.
Regards,
Shivani
Madam,
Here in attached example, you have used object model and binding. In my case I am using String List as
public List<string> DefGrpByFld = new List<string>();
GrpBy.ComboBoxSource = DefGrpByFld;
Please check and solve accordingl
Hi Amish,
We have checked your requirements and prepared the sample based on your requirements. We have set the SelectedItem value using List<string> in the code behind. We have attached a sample for your reference
Please let us know if the problem is resolved on your side. If issue is not fixed share more details of that issue's replication
Regards,
Shivani