We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to Disable Alphabetical Sorting in MultiSelectionComboBox WinForms Control

I set DataSource property to a collection already sorted. I do not want MultiSelectionComboBox to re-sort it and to keep the order of the items as it is.

Suppose the collection is called 'myList' of type List<MyItem> as follows:
List<MyItem> myList = new List<MyList>
{
     new MyItem { Id = 1, Name = "B"},
     new MyItem { Id = 2, Name = "A"},
     new MyItem { Id = 3, Name = "C"}
};

And these are the setting of the control called 'mscb':
mscb.DataSource = myList;
mscb.DisplayMember = "Name";
mscb.ValueMember = "Id";

The result will be (A, B, C)!
How to make the items appear in the same order as myList (B, A, C)?


1 Reply

DV Duraimurugan Vedagiri Syncfusion Team February 3, 2020 01:35 PM UTC

Hi Mohammed,

Thanks for your interest in Syncfusion product.

We have considered your requirement as a feature request and it will be included in our upcoming main release.

You can track the status through the following feedback link:

https://www.syncfusion.com/feedback/11745/provide-option-to-enable-or-disable-sorting-in-multiselectioncombobox 

We will let you know once the feature is implemented.

Please let us know if you need any further assistance.

Regards,
Durai 


Loader.
Live Chat Icon For mobile
Up arrow icon