473,786 Members | 2,775 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

databinding for multiple comboboxes

I have a 4 tab form each with different dataviews attached to a datagrid. On
the last tab, I have a dataview attached to a datagrid and 2 comboxes that
are bound to the same dataset representing 2 different columns in the dv.
When I create cbSecond.Bindin gContext = new BindingContext( ); the combox
loads okay but the value does not change with the new row, nor do changes in
the combox propogate to the dv. (combobox 1 works okay as long as i don't do:
cbfirst.binding Context = new BindingContext( );). Instead I get a a form that
freezes when a new selection is made from the dropdown list in cb2. When the
first combobox value is changed, the second combox clears the textbox. I
have regnerated the dataset, the dataviews and deleted and reapplied the
datagrid numerous times. What is wrong with it?
Nov 17 '05 #1
1 1650
I have narrowed some of the problem down. When I moved the 2nd combox off of
the tab pain onto the parent form, everything works. So that leads to
believe that the tabcontol binding manager is the problem. So how do I fix
this? I already tried to create seperate binding contexts for each tabpage,
but that didn't appear to change anything.

"Kevin" wrote:
I have a 4 tab form each with different dataviews attached to a datagrid. On
the last tab, I have a dataview attached to a datagrid and 2 comboxes that
are bound to the same dataset representing 2 different columns in the dv.
When I create cbSecond.Bindin gContext = new BindingContext( ); the combox
loads okay but the value does not change with the new row, nor do changes in
the combox propogate to the dv. (combobox 1 works okay as long as i don't do:
cbfirst.binding Context = new BindingContext( );). Instead I get a a form that
freezes when a new selection is made from the dropdown list in cb2. When the
first combobox value is changed, the second combox clears the textbox. I
have regnerated the dataset, the dataviews and deleted and reapplied the
datagrid numerous times. What is wrong with it?

Nov 17 '05 #2

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

Similar topics

0
7686
by: Timothy White | last post by:
I have a Windows Form Which Displays one record at a time. The DataTable object which is bound to the Form Controls only contains the record that is being displayed. When I need to display a different record, any changes in the current record are saved to an Access Database, the DataTable's Row Collection is Cleared and the New Record is read into the DataTable. (This is done to ensure that when the User goes to view a record, they get...
0
1523
by: Richard | last post by:
Hi, I'm having issues with DataBinding. I have a Form with two data bound comboboxes on it. When you select something in one combobox I may {or may not} want to change the selected item in the other combobox. For reasons beyond the scope of this post I need to change the second comboboxe's selected index from within a ColumnChanging event handler. So, inside a ColumnChanging event handler I change the value of the column that is bound to...
1
6205
by: Stijn Goris | last post by:
Hi all, I have 3 Comboboxes i want to bind with 3 different DatTables. I use this.cbxProductCategory.DataSource = myDataTable; this.cbxProductCategory.DisplayMember = "PTCA_DESCR"; this.cbxProductCategory.ValueMember = "PTCA_CODE"; to bind the data. Although I 'm 100% the data is inside the differnet DataTables.I don't see the values in the comboboxes. When I only bind one DataTable to one combobox
2
1217
by: Hemang Shah | last post by:
Hello I've few questions regarding ADO & C#: 1) Is it possible to view tata from multiple tables in the Datagrid control ? Most of the examples I see are only for 1 table. 2) In Comboboxes, can we display multiple fields ? For example in a Form of customers, we have a combo box to select the customer you want to change, so in that combo box, when they drop down, can we have it to display "First
1
2800
by: TheMadHatter | last post by:
I have an array of a custom obj which I am trying to use in multiple comboBoxes without creating multiple copies, but if I put the datasource of the comboboxes to the same array, then at runtime if I pick change a combobox, all of them change to that value. I am guessing that it is because all the comboboxes are using the same Ilist interface, and the behind-the-sceens variables. Now, I could create my own wrapper class to wrap the...
4
6199
by: ECathell | last post by:
I am trying to databind 2 combo boxes to the same datasource but different fields using the same lookup table. The information in combobox2 is duplicating combobox 1(ie it appears to be gathering the wrong information) I have verified the proper information through query analyzer.... Me.FormatName1ComboBox.DataSource = LabelFormats Me.FormatName1ComboBox.DisplayMember = "Formatname" Me.FormatName1ComboBox.ValueMember = "FormatName" ...
2
11460
by: Matt | last post by:
Hi all, me again! :) I've now got an issue with combo boxes. Basically, I have a number of items that I want a user to pick from a single list. It's basically along the lines of: Fruit 1: Fruit 2: Fruit 3:
7
13531
by: JTC^..^ | last post by:
When i attempt to bind to the "Text" and "Value" property of a combobox on a windows form the value is reset when I leave the combobox. The comboboxes contain the correct Text and Values. I know this as the Value property binds correctly on it own. It is only when I bind the "Text" and "Value" that the issue occurs. The following sample code includes my custom classes and the Form Clode. I have several comboboxes and customer classes...
0
1315
by: theleshie | last post by:
Hi, I am creating an application which dynamically creates forms depending on the information held in a dataset (which also includes the data the application itself uses). As part of dynamically creating these forms, I need to bind controls back to their underlying tables. This has been successful with textboxes, but I am having a lot of difficulty with comboboxes. Setting the datasource to the bindinglist seems to be ok, but I am having...
2
2676
by: Nathan Sokalski | last post by:
I have a Repeater that uses a DataSource that has multiple fields. When the values of these fields is displayed in the Repeater, there are fields that are used in combination with other fields as well as by themselves. For example, there may be a firstname field that is used in combination with a lastname field as well as by itself. Using it by itself is simple, I have done that many times. However, is there a way to use multiple fields in...
0
9650
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
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 we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.