Click here to Skip to main content
15,918,624 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.

Quote:
Software dvg

Click here to see Software dvg gif


Quote:
My dvg



Click here to see Software dvg gif


Quote:
The Code I used


C#
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
Posted
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[^]

UPDATE

Try this then: ComboBox in DatagridView in Edit Mode[^]
 
Share this answer
 
v3
Comments
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