Click here to Skip to main content
15,790,723 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to auto filter the combobox list items automatically if anywhere the text is matches in the list items using c# in winforms.


If the user enter "Jonne" in the combobox, suggestions list must filter as follows.

Jonne Mathew
Kent Jonne
Thoms Robert Jonne
Thoms Jonne

I am using the following code

What I have tried:

comboBoxDealerSearch.DataSource = dt;
comboBoxDealerSearch.DisplayMember = "Dealer_Name";
comboBoxDealerSearch.ValueMember = "Id";
comboBoxDealerSearch.AutoCompleteMode = 
comboBoxDealerSearch.AutoCompleteSource = 
Updated 15-Jul-23 14:59pm
Member 15627495 15-Jul-23 15:19pm    
there are methods to sort your comboBox,
but know that you can sort the dataContainer invovled before you fill the combobox.

you have : ComboBox / datatable ( or in-middle ) / and SQl query : all those can sort your result before the display

1 solution

Here is a CodeProject article (Tip) that does what you want: ComboBox with Suggest Ability based on Substring-Search[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900