Click here to Skip to main content
15,745,509 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have dvg in my app and I saw a software contain a dvg and I like the way made with I will attatch a gif for it and Also I will attatch my dvg and The code I use.

Software dvg

Click here to see Software dvg gif

My dvg

Click here to see Software dvg gif

The Code I used

if (e.Control is DataGridViewComboBoxEditingControl)
            ((ComboBox)e.Control).DropDownStyle = ComboBoxStyle.DropDown;
            ((ComboBox)e.Control).AutoCompleteSource = AutoCompleteSource.ListItems;
            ((ComboBox)e.Control).AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;

What I have tried:

I tried previous code and the result not like what I want
Updated 29-Nov-22 21:30pm

1 solution

I used Google Search and found many examples of how to do this.

My Search: enable combobox selection in a datagridview - Google Search[^]

Here is one example from the search results: C# Tutorial - Add Combobox to DataGridView | FoxLearn - YouTube[^]


Try this then: ComboBox in DatagridView in Edit Mode[^]
Share this answer
kudim 30-Nov-22 5:16am    
Yes I know this but I need to became editable and autocompleted just like first gif I attached .
Graeme_Grant 30-Nov-22 5:54am    
Updated. Just a matter of googling... The best solution is to use WPF, far simpler.

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