Hi, I have a question. I am using the standard winform ComboBox who's text value is databound to my bindingsource. Everything seems to work correctly however, if I have the style of the combobox set to DropDownList and I change the value of the control by tabing over to it and then using the up/down arrow keys then the new value within the combobox does NOT get sent to the datasource, if however I click on the control and change the value using the mouse then the change makes it to the datasource, if I then change the property of the combobox to dropdown it seems to save the change to the datasource regardless if I tab and change the value using the up or down arrows or change it with the mouse..
Any Help would be greatly appreciated. Is this normal operation or a bug?
You can download a copy of my project from the link below:
http://www.classifieds.ca/publicfiles/comboboxtest.zip
if
you tab between the two combo box's and us the up/down arrow keys to
change the value within the combobox and then select the save button
the value never propagates itself to the datasource.
Thanks,
Loading
Rob DobPosted Oct 13, 2009, 9:18 PM
Thank you..
Dushan StankovicPosted Oct 9, 2009, 6:34 PM
Look at the msdn explanation:
Text portion is not EDITABLE at DropDownList Style, and when you changing values with arrow keys you just change them into drop down list. I think that you have your bug because you Bind Text property of CMB to BindingSource, and it's be better to bind SelectedValue or something like that.