2

I have DataGridView whith Column of comboboxes.

I have to click twice the cell in order combo to be opened.

Anyone knows how may I make it to be opened from the first click.

Thank you in advance.

Michael
  • 13,950
  • 57
  • 145
  • 288
  • possible duplicate of [Direct access to DataGridView combobox in one click?](http://stackoverflow.com/questions/3445070/direct-access-to-datagridview-combobox-in-one-click) – kleopatra Aug 26 '15 at 11:05
  • You may want to check [this solution.](http://stackoverflow.com/questions/34543940/datagridviewcomboboxcolumn-doesnt-open-the-dropdown-on-first-click/39757746#39757746) – TaW Sep 28 '16 at 21:19

2 Answers2

2
Check below links it will help you

Direct access to DataGridView combobox in one click?

http://social.msdn.microsoft.com/Forums/en/winformsdatacontrols/thread/a5acbaf3-9d80-4d0c-8c7d-77eea7d4efd0

Community
  • 1
  • 1
andy
  • 5,979
  • 2
  • 27
  • 49
0

Here's an easier way:

In the CellEnter event, check if the column index corresponds with the combobox column. If it does, set

DataGridView.EditMode = DataGridViewEditMode.EditOnEnter; 

or if it's a regular column, set it to the default

DataGridView.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2; 
Taraz
  • 1,242
  • 13
  • 13