473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

combobox in datagridview requires 2 clicks to drop down

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
3 14395

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ehm | last post by:
I am working on creating an editable grid (for use in adding, deleting, and editing rows back to an Oracle database). I have a JSP that posts back to a servlet, which in turns posts to a WebLogic...
3
by: Deb | last post by:
I am having a problem creating a form in Access 2000 which I have done with no problem in 97. I have an unbound drop down box. This idea is for the user to select from the drop down box and the...
2
by: Kyle Blaney | last post by:
I am using a Listbox and can not get the "drop down" effect. My listbox is populated with 20 items and a vertical scrollbar is automatically added. One item is visible. When I click on the...
3
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
0
by: TD | last post by:
I have a combobox that is sometimes slow to drop down when clicked on. If you select an item in the list that is near the top of the list then the next time you click on the combobox it drops down...
7
by: hung tran | last post by:
Hi, I'd like to drop down a combobox after validating the Leave() event, how can I do that ? Thanks
6
by: zacks | last post by:
I have an application I am developing that has a Combo Box that is intended to show a list of available tables in the selected DSN. I have put code in the control's DropDown event handler to clear...
3
by: - HAL9000 | last post by:
I am trying to get an event when the drop-down Combo Box goes away / reverts back to showing a single item. For example, clicking the box's down arrow, to remove the drop-down window, doesn't...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.