How do I get DataGridView comboboxes to display their drop down list in one click?

前端 未结 4 1350
故里飘歌
故里飘歌 2021-01-06 02:42

After I set \"EditOnEnter\" to be true, the DataGridViewComboBoxCell still takes two clicks to open if I don\'t click on the down arrow part of the combo box.

4条回答
  •  萌比男神i
    2021-01-06 03:36

    To avoid the SendKeys issues, try the solution from Open dropdown(in a datagrid view) items on a single click. Essentially, in OnEditingControlShowing hook to the Enter event of the combo box, in the Enter event handler, set ComboBox.DroppedDown = true. That seems to have the same effect, but without the side effects @Cody Gray mentions.

提交回复
热议问题