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.FormatName1C omboBox.DataSou rce = LabelFormats
Me.FormatName1C omboBox.Display Member = "Formatname "
Me.FormatName1C omboBox.ValueMe mber = "FormatName "
Me.FormatName1C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 1"))
Me.FormatName2C omboBox.DataSou rce = LabelFormats
Me.FormatName2C omboBox.Display Member = "Formatname "
Me.FormatName2C omboBox.ValueMe mber = "FormatName "
Me.FormatName2C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 2"))
--
--Eric Cathell, MCSA 4 6198
Hi,
The currency manager will keep the 2 comboboxes in sync when they
are bound to the same datasource. Create a dataview to bind one of the
comboboxes to.
Ken
---------------------------
"ECathell" wrote: 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.FormatName1C omboBox.DataSou rce = LabelFormats
Me.FormatName1C omboBox.Display Member = "Formatname "
Me.FormatName1C omboBox.ValueMe mber = "FormatName "
Me.FormatName1C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 1"))
Me.FormatName2C omboBox.DataSou rce = LabelFormats
Me.FormatName2C omboBox.Display Member = "Formatname "
Me.FormatName2C omboBox.ValueMe mber = "FormatName "
Me.FormatName2C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 2"))
-- --Eric Cathell, MCSA
A little addition before it is misunderstood
*New* dataview
Cor
so because they both have the same datasource(look up table) they will stay
in sync? so really then I need to create a second instance of the lookup
datasource....o k...seem redundant since it is the SAME lookup datasource and
bound to different columns of the products datasource...
"Ken Tucker [MVP]" <Ke**********@d iscussions.micr osoft.com> wrote in message
news:3F******** *************** ***********@mic rosoft.com... Hi,
The currency manager will keep the 2 comboboxes in sync when they are bound to the same datasource. Create a dataview to bind one of the comboboxes to.
Ken ---------------------------
"ECathell" wrote:
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.FormatName1C omboBox.DataSou rce = LabelFormats
Me.FormatName1C omboBox.Display Member = "Formatname "
Me.FormatName1C omboBox.ValueMe mber = "FormatName "
Me.FormatName1C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 1"))
Me.FormatName2C omboBox.DataSou rce = LabelFormats
Me.FormatName2C omboBox.Display Member = "Formatname "
Me.FormatName2C omboBox.ValueMe mber = "FormatName "
Me.FormatName2C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 2"))
-- --Eric Cathell, MCSA
But as Ken said is the postion of the row by the currencymanager bound
"ECathell" <ec******@nospa m.com> schreef in bericht
news:ux******** *****@TK2MSFTNG P04.phx.gbl... so because they both have the same datasource(look up table) they will stay in sync? so really then I need to create a second instance of the lookup datasource....o k...seem redundant since it is the SAME lookup datasource and bound to different columns of the products datasource...
"Ken Tucker [MVP]" <Ke**********@d iscussions.micr osoft.com> wrote in message news:3F******** *************** ***********@mic rosoft.com... Hi,
The currency manager will keep the 2 comboboxes in sync when they are bound to the same datasource. Create a dataview to bind one of the comboboxes to.
Ken ---------------------------
"ECathell" wrote:
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.FormatName1C omboBox.DataSou rce = LabelFormats
Me.FormatName1C omboBox.Display Member = "Formatname "
Me.FormatName1C omboBox.ValueMe mber = "FormatName "
Me.FormatName1C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 1"))
Me.FormatName2C omboBox.DataSou rce = LabelFormats
Me.FormatName2C omboBox.Display Member = "Formatname "
Me.FormatName2C omboBox.ValueMe mber = "FormatName "
Me.FormatName2C omboBox.DataBin dings.Add(New Binding("Select edValue", ProductsBinding source, "FormatName 2"))
-- --Eric Cathell, MCSA
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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
|
by: david.kao |
last post by:
Hi All:
I have a dataset contains two tables, one parent child relation between two
tables. I have no trouble to bind parent table to a combobox, relation to a
win grid control. But I am having trouble to bind relation into another combo
box. DotNet does not give me a run time error. But it did not perform the way
I am expecting.
Thanks in advance
DK
|
by: Gary Shell |
last post by:
I have a pair of combo boxes on a form. Both have their SelectedValue
property bound to a column on a table called "Input_Output". One column is
called "Class" and the second is called "SubClass". Each combobox has its
datasource, displaymember and SelectedValue member bound to separate tables
thru individual datatsets thru individual data adapters. The two tables are
"Class" and "SubClass".
I use parameterized query to populate the...
|
by: Bruno Rodrigues |
last post by:
The controls in my form are bounded to a datasource, including textboxes,
comboboxes, etc...
Something lame happens: In runtime, the last focused control before clicking
on my save button, doesn't have its datasource bounded value refreshed with
the new data inputed. I think the control's LostFocus event it's not properly
fired when I click a ToolStrip button, and the databinding is not updated.
I came with the following piece of code on...
| |
by: GaryDean |
last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much
in answers so I'm reposting some questions posted by some of the programmers
here in our organization that never got answered...
In 1.1 we always did our own myDataAdapter.fills and we liked that control
for lots of good reasons. Now the new DataSource (or is it a
TableAdapter:Dataset) automatically fills the Gridview. How can we control
that fill?
In a...
|
by: Anthony Bollinger |
last post by:
I have two tables in a master-detail relationship. When I make a selection
in one combobox, how do I have it display the values from a second combobox?
Each table has a key and a text value for each record. I don't yet see the
way to update the list of values in the second combobox.
Thanks for any input,
Tony
|
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...
|
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...
|
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...
|
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,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |