Solved

Cursor stuck in Combobox

Posted on 2004-09-13
7
366 Views
Last Modified: 2012-08-13
I have a combobox on a windows form.  The combobox is not a required field so it can be left blank.  However, when the user focuses on the combobox, it will not release the cursor and allow the user to select any of the other controls on the page until they select an item from the dropdown menu.  Is this by design?  If so, it stinks and I need a way around it.  Any help is gratefully appreciated.

Matt
0
Comment
Question by:mglace390
  • 3
  • 2
7 Comments
 
LVL 5

Expert Comment

by:tzxie2000
ID: 12044829
how about add a blank as an item into the combobox
you can see many similar design in internet
0
 
LVL 2

Author Comment

by:mglace390
ID: 12045080
That is a possible solution however it sounds like a workaround to me.  Is this a bug?  Why is the same thing not happening to the other combo boxes on the form?  Could it have to do with the way it is populated?  The combo I populate using the DataSource property acts as it should and the combo that is causing the error above is populated using the AddRange method.
0
 
LVL 5

Expert Comment

by:tzxie2000
ID: 12045139
do you use databinding?
whether the combobox binding value is not allow null value?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Author Comment

by:mglace390
ID: 12046853
I do use databinding and I bind the SelectedItem to a string column of a datatable.  The column I'm binding to is nillable therefore I should be able to leave the combobox blank.  Is this what you are referring to?
0
 
LVL 2

Author Comment

by:mglace390
ID: 12047154
I solved the problem by taking out the databinding all together.  I simply set the combo box's SelectedItem property to the value of the field in the DataRow in the constructor and vise versa in the form closing event.  Works exactly how I want it to.  Thank you for your help anyway.

Matt
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12269833
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now