Multiple selection in sfComboBox

Hi Team,


I have a combobox with multiple selection enabled and this happens in MAUI Android (not able to test in other platforms). I have the user to select multiple items from the dropdown and save the data to the database. All this works fine. However, when the same data is retrieved, each selected item is shown twice in the dropdown.


Steps to reproduce:

  1. Have combobox and enable multiple selection.
  2. select one or more items and save it into the database.
  3. Recall the saved data, the selected items will be shown twice in the dropdown and when you save it again without modifying it, each item gets saved twice.

Here is the sample code:
XAML:

 <editors:SfComboBox x:Name="cboChemist" DropDownItemFontFamily="poppinslight.ttf#poppinslight"

                              DisplayMemberPath="Key" IsClearButtonVisible="True"

                              SelectionMode="Multiple" TokensWrapMode="Wrap" HorizontalOptions="FillAndExpand"

                              Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="8"

              SelectedItem="{Binding Value,Mode=TwoWay}" DropDownItemHeight="30"

                                      IsEditable="True" IsFilteringEnabled="True" SelectionTextHighlightColor="Transparent"

                                   Placeholder="Type here to filter chemist's name"

                                  TextSearchMode="Contains" Style="{StaticResource ComboBoxStyle}"

                              >

 </editors:SfComboBox>


Xaml.Cs (to retrieve the data):


 await MainThread.InvokeOnMainThreadAsync(() =>

 {

 cboChemist.SelectedItems.Clear();

 cboChemist.ItemsSource = null;

 cboChemist.SelectedIndex = -1;

 cboChemist.DisplayMemberPath = "Key";

 cboChemist.SelectedValuePath = "Value";


 cboChemist.ItemsSource = lc; // lc has the total list of chemists


 foreach (ListSource l in seldr) //seldr is the data selected by the user and saved. These are added to the selecteditems to show the user what was already selected.

 {

     cboChemist.SelectedItems.Add(l);

 }

});

What is surprising is that when the above line is executed, the selecteditems count is exactly same as what the user selected but later the items gets added once more and when saving the selecteditems count is increased. Each selection is added once more in the selecteditems list.


This is happening after upgrading to the latest version a couple of days ago. 

Needs to be fixed at the earliest as it affects the production data.


Thanks

Santhosh

1 Reply

KP Kamalesh Periyasamy Syncfusion Team April 24, 2025 02:48 PM UTC

Hi Santhosh,


We have reviewed the reported issue regarding duplicate items appearing in the SfComboBox when retrieving saved selections in multiple selection mode. Based on the code snippet you provided, we created a sample application to reproduce the scenario, but we were unable to observe the described behavior.   

In our testing with the latest version of 
Syncfusion.Maui.Inputs, the SfComboBox correctly maintains the selected items without duplication when saving and loading selections. The items appear only once in the dropdown and the SelectedItems collection maintains the correct count. 
 
 
To assist you further, we have attached our test sample and an output demonstration video showing the behavior on Android. The sample implements the exact scenario you described:  

  1. Selecting multiple items in the ComboBox  
  2. Saving the selection to a local collection  
  3. Clearing and reloading the saved selection  

 
Kindly review the attached sample and let us know if you can reproduce the issue with our implementation. If the issue still persists in your application, please provide:  

  • The exact version of Syncfusion.Maui.Inputs you are using  
  • The .NET MAUI version in your project  
  • Any custom filtering applied. 
  • A simplified reproducible sample that demonstrates the issue  
  • The specific Android device/emulator and OS version where you're seeing the problem  

 
This additional information will help us investigate further and provide a more targeted solution. If you can modify our sample to reproduce the issue, that would be particularly helpful for our analysis.  


Looking forward to your response.
 


Regards,
 
Kamalesh P 


Attachment: ComboBoxSample_9c6c4df6.zip

Loader.
Up arrow icon