mglace390
asked on
Cursor stuck in Combobox
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
Matt
ASKER
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.
do you use databinding?
whether the combobox binding value is not allow null value?
whether the combobox binding value is not allow null value?
ASKER
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?
ASKER
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
Matt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can see many similar design in internet