422,946 Members | 1,099 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,946 IT Pros & Developers. It's quick & easy.

combobox in datagridview requires 2 clicks to drop down

P: n/a
rut
It appears that when you first click on the combo box that it just sets the
focus to the control, then the 2nd click makes it drop down. Is there a way
to make this work with just one click?

This is very annoying as a user to have to click twice whenever I use the
combo box in the datagridview.

Thanks,
rut
Jul 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

rut wrote:
It appears that when you first click on the combo box that it just sets the
focus to the control, then the 2nd click makes it drop down. Is there a way
to make this work with just one click?

This is very annoying as a user to have to click twice whenever I use the
combo box in the datagridview.

Thanks,
rut
Can you create a handler for the Enter event which is fire when the
control gets focus that sets the DroppedDown property of the combo box
to true?

private void comboBox1_Enter(object sender, System.EventArgs e)
{
comboBox1.DroppedDown = true;
}

Regards
Richard

http://www.richardjonas.com/blog

Jul 14 '06 #2

P: n/a
rut
I thought about that but I'm unsure how to create a handler and attach it to
the grid's combo box. Does anyone know how?

"ri****************@hotmail.com" wrote:
>
rut wrote:
It appears that when you first click on the combo box that it just sets the
focus to the control, then the 2nd click makes it drop down. Is there a way
to make this work with just one click?

This is very annoying as a user to have to click twice whenever I use the
combo box in the datagridview.

Thanks,
rut

Can you create a handler for the Enter event which is fire when the
control gets focus that sets the DroppedDown property of the combo box
to true?

private void comboBox1_Enter(object sender, System.EventArgs e)
{
comboBox1.DroppedDown = true;
}

Regards
Richard

http://www.richardjonas.com/blog

Jul 14 '06 #3

P: 1
Hi,

i also had that problem. you can solve this, when you change the EditMode of your DataGridView to "EditOnEnter" in der properties window, or in the code:

datagridview.EditMode = DataGridViewEditMode.EditOnEnter;

then the combobox drops down on the first click!

hope that helps,

cu
Jul 25 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.