Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DataGridViewComboBoxCell takes several clicks to bring up menu for another cell. Advice on speeding up the process?

In order to bring up the menu for a DataGridViewComboBoxCell, I first have to click:
1) the row of the cell I want to edit
2) within the cell I want to edit
3) the I want to edit again, in order to open the ComboBox for the cell.

If another cell is already selected, the first click will close the already-active ComboBox, then 3 more clicks will then be required in order to open the ComboBox.

Seeing as nothing like this level of activity is required in order to click a DataGridViewButtonCell (DGVButtonCells respond to the first click, second if there was already a menu open), can anyone suggest a simple way of getting a class deriving from DataGridViewComboBoxCell to have the same level of responsiveness as DGVButtonCell?

like image 322
Frosty840 Avatar asked Jan 24 '23 11:01

Frosty840


1 Answers

Try setting the EditMode to EditOnEnter (either in the code or on the Properties page of the DataGridView). This should open it on the first click.

dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
like image 161
Ezekiel Rage Avatar answered May 20 '23 16:05

Ezekiel Rage