473,473 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 14402

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
berndi_2000
1 New Member
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.