ComboBox not Binding When Text Typed In

J

jehugaleahsa

Hello:

First of all, sorry if I leave out some details. I have a bad habit of
doing that. Just ask me and I will surely give them to you.

I have a Windows Form with a combo box on it. It's SelectedValue
property is bound to one of our business objects. When the control is
validated the business object's property is updated.
(DataSourceUpdateMode = OnValidate)

We noticed that when we select the value from the drop down list, the
business object property is set. However, if we type in the value into
the text portion, nothing happens. We can lose focus, what-have-you,
and it never updates the business object.

This is a problem. Our users are typing in their values rather than
selected them from the list. When they go to save, the business object
doesn't reflect their changes. Nothing is changed! We can't change the
DropDownStyle to DropDownList since custom values are allowed.

Is there a setting somewhere that we're missing?

Any help is greatly appreciated!
 
R

rhaazy

If you have a look up combo box your users should not be typing in the
values.
Make the control read only.
 
J

jehugaleahsa

If you have a look up combo box your users should not be typing in the
values.
Make the control read only.

They need to enter in custom values. There is a list of bound values.
But the user should also be able to enter a new value if necessary.

I am just looking for a way to force a property change.
 
J

jorge vera

The combo box can not FIND the "value" on its collection because what the
user types does not match exactly any value on the collection. and if is a
NEW value will never match.


If you allow the user the create custom values any time and you want to keep
the new values, somehow you should be able to find out that
This is a new value
Add it to the collection that is bind to the combo box
update the collection, insert on the table if u are using a table or XML
and then reload the collection and bind again to the combo box,
problems? if the user type diferent values every minutes you will be doing
alot of transaction.
going back ad forward from the Db to the client will made the application
slow.
that's why we have like a 3 dot button to create all the "new values" at
once and then load the combo box only once.

I hope I made it clear and not worst.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top