DataGridView combo box

M

Mark Rendle

I've got a DataGridView with a combo box in one of the columns. As it
stands, the user has to click the dropdown button twice - once to focus the
cell, and again to drop down the list. I can't find any property to change
this behaviour, the EditingControlShowing event doesn't fire until they
click the dropdown button, and I can't find a property or method to get the
DataGridViewComboBoxEditingControl object outside of the
EditingControlShowing event.

So, does anyone know, how can I get the list portion to display the first
time the dropdown button is clicked?
 
M

Mark Rendle

This is insanely annoying.

I've added an event handler to the CellEnter event which calls BeginEdit,
which forces the EditingControlShowing event to fire. Then in the
EditingControlShowing handler, I'm setting the
DataGridViewComboBoxEditingControl.DroppedDown to true. This makes the list
portion appear, but it appears under the cell which previously had the
focus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top