473,385 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ComboBox not Binding When Text Typed In

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!
Nov 5 '08 #1
3 3186

If you have a look up combo box your users should not be typing in the
values.
Make the control read only.
Nov 5 '08 #2
On Nov 5, 2:05*pm, rhaazy <rha...@gmail.comwrote:
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.
Nov 5 '08 #3
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.

Nov 6 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jesse | last post by:
Hi there, I am trying to bind a combobox and some textboxes to a single table in a dataset. I want it so that when a (unique) value in the combobox is selected, the other textboxes show...
2
by: ross kerr | last post by:
Hi all, I have a control that extends the ComboBox object. It updates the selected item based on what the user enters in the text area. In the OnLeave event of the combobox, the selected...
1
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
2
by: shumaker | last post by:
I have a combobox that is very much like the one found in the RSS project here: http://msdn.microsoft.com/vstudio/express/visualCSharp/learning/ My projectNameComboBox basically is filled with a...
0
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number...
19
by: active | last post by:
I'm using a ComboBox to display objects of a class I've defined, say CQQ. Works great except somehow I occasionally set an Item to a String object instead of an object of type CQQ. It looks...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
4
by: Jerad Rose | last post by:
I'm baffled by this -- is there not a typed object used for ComboBox Items? Best I can tell, all of the methods for ComboBox that accept an Item are of type Object. Why in the world is a...
3
by: Gerrit | last post by:
Hi, I try to learn programming in c# with databinding controls. Now I have a problem with a ComboBox with the advanced properties for databinding, I want to set the DataSourceUpdateMode to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.