Possible Duplicate:
Open dropdown(in a datagrid view) items on a single click
We have a DataGridView where one column is a ComboBox with the DropDownButton style. The DataGridView is in FullRowSelect mode. Let's assume that I have 5 rows, and row 0 is selected in the DataGridView.
I want to select an item from the ComboBox of -say for example- row 2, therefore I click the little arrow of the ComboBox. When I do this, first, row 2 of the DataGridView is selected. The ComboBox does not open yet. Only the second click opens the ComboBox.
In fact, it used to require 3 clicks, but then we overloaded the CellMouseDown to do:
myDataGridView.ClearSelection();
myDataGridView.Rows[e.RowIndex].Selected = true;
With this, we're down to 2 clicks. Is there a way to show the ComboBox items with one click only?
Edit: I should also mention that, instead of clicking on the little arrow of the ComboBox, if I click the ComboBox itself, it takes 3 clicks to show the ComboBox items!
Set your DataGridView's EditMode property to EditOnEnter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With