473,513 Members | 2,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ComboBox problem?

19 New Member
I’m using VS 2008
I have a bound ComboBox on a form.
It is bound to a tblInvoiceHeader. VendorID, and it shows the VendorName. When clicked it displays a list of Vendors. When one is selected it is suppose to put the VendorID into this field.

When the form opens it displays the correct vendor (the one whose VendorID = the VendorID in this textbox), but when I change the selection it remains stuck in this ComboBox, I can’t do anything else on the form, nothing responds other than the combobox but no matter what I do in the combobox I can’t exist it.

The Combo is setup as such:
Data Source – a binding source that is connected to the VendorDS
Display Member - VendorName
Value Member – VendorID
All these are from the VendorDS.tblVendor
Selected Value – InvoiceHeaderBindingSource.VendorID ( I have tried changing this the dataset.table but it makes no difference to this behavior)
Feb 11 '08 #1
6 1097
kenobewan
4,871 Recognized Expert Specialist
I’m using VS 2008
I have a bound ComboBox on a form.
It is bound to a tblInvoiceHeader. VendorID, and it shows the VendorName. When clicked it displays a list of Vendors. When one is selected it is suppose to put the VendorID into this field.

When the form opens it displays the correct vendor (the one whose VendorID = the VendorID in this textbox), but when I change the selection it remains stuck in this ComboBox, I can’t do anything else on the form, nothing responds other than the combobox but no matter what I do in the combobox I can’t exist it.

The Combo is setup as such:
Data Source – a binding source that is connected to the VendorDS
Display Member - VendorName
Value Member – VendorID
All these are from the VendorDS.tblVendor
Selected Value – InvoiceHeaderBindingSource.VendorID ( I have tried changing this the dataset.table but it makes no difference to this behavior)
What event(s) are you using with the combobox? Better to display the error.
Feb 11 '08 #2
Kirsten
19 New Member
I am not using any events with it, nor am I getting any error.


What event(s) are you using with the combobox? Better to display the error.
Feb 11 '08 #3
Plater
7,872 Recognized Expert Expert
Is this combobox supposed to be "updating" the value back in it's datasource?
I would imagine if it were trying to do that whenever it lost focus, and won't give up focus until the datasource says "yeah, I updated it", that it will get stuck there if the datasource does not acknowledge the action.
Feb 11 '08 #4
Kirsten
19 New Member
Yes it is suppose to be updating the DataSource.
But why would that matter or make a problem?


Is this combobox supposed to be "updating" the value back in it's datasource?
I would imagine if it were trying to do that whenever it lost focus, and won't give up focus until the datasource says "yeah, I updated it", that it will get stuck there if the datasource does not acknowledge the action.
Feb 11 '08 #5
Plater
7,872 Recognized Expert Expert
Yes it is suppose to be updating the DataSource.
But why would that matter or make a problem?
For the exact reasons I just stated. Is the datasource updating itself correctly?
Attach an event handler to the selected item changer then set a breakpoint.
Step through and keep an eye on the datasource with the watch window.
See if changes have been updated?
Feb 11 '08 #6
Kirsten
19 New Member
Thanks for your help.
I resolved the problem which was the DataBinding.Text had a value and when I removed it now it's working.

For the exact reasons I just stated. Is the datasource updating itself correctly?
Attach an event handler to the selected item changer then set a breakpoint.
Step through and keep an eye on the datasource with the watch window.
See if changes have been updated?
Feb 11 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2473
by: Chandra | last post by:
Hello Sir, This is Chandra and Working as Software Engineer. I got a really weird problem with ComboBoxes. I have set the ComboBox DroppedDown Property to true. Now the actual problem is...
7
8485
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
8
12066
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
2478
by: anonymous | last post by:
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new...
3
6805
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article:...
0
2357
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first...
4
3976
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank...
30
4519
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
4
4602
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
5
3170
by: Peter M. | last post by:
I'm struggling with combobox databinding with something I consider a bug... I'm binding my combobox to an array of structs. The struct exposes two public properties, ID and Name, to be used as...
0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7160
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7099
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1594
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.