473,395 Members | 1,568 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,395 software developers and data experts.

Question on structures....

I am missing something here and appreciate any help.

I am using a structure of states. I assign the datasource to 2 independent
combo boxes (component one) on my form. When I change the selected
state in, say, the cboHmState combo box, it also changes in the cboMlState
combo box.

How do I unlink this dependency I did NOT want in the first place? Please
help.

Thanks, W.

cboHmState.DataSource = States 'Populate the list
cboHmState.Splits(0).DisplayColumns(0).Visible = False
cboMlState.DataSource = States 'Populate the list
cboMlState.Splits(0).DisplayColumns(0).Visible = False
Nov 20 '05 #1
2 891
What exactly does your structure look like?

-Sam Matzen
"news.microsoft.com" <no*****@nothanks.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
I am missing something here and appreciate any help.

I am using a structure of states. I assign the datasource to 2 independent
combo boxes (component one) on my form. When I change the selected
state in, say, the cboHmState combo box, it also changes in the cboMlState
combo box.

How do I unlink this dependency I did NOT want in the first place? Please
help.

Thanks, W.

cboHmState.DataSource = States 'Populate the list
cboHmState.Splits(0).DisplayColumns(0).Visible = False
cboMlState.DataSource = States 'Populate the list
cboMlState.Splits(0).DisplayColumns(0).Visible = False

Nov 20 '05 #2
This is because you are using the same binding context, therfore the
position in the binding context ( Selected item ) will be reflected in the
other.

Try adding 'New' bindings for each ComboBox1.DataBindings.Add( New
Binding( . . . . .

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"news.microsoft.com" <no*****@nothanks.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
I am missing something here and appreciate any help.

I am using a structure of states. I assign the datasource to 2 independent
combo boxes (component one) on my form. When I change the selected
state in, say, the cboHmState combo box, it also changes in the cboMlState
combo box.

How do I unlink this dependency I did NOT want in the first place? Please
help.

Thanks, W.

cboHmState.DataSource = States 'Populate the list
cboHmState.Splits(0).DisplayColumns(0).Visible = False
cboMlState.DataSource = States 'Populate the list
cboMlState.Splits(0).DisplayColumns(0).Visible = False

Nov 20 '05 #3

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

Similar topics

1
by: kazack | last post by:
Hi all it's me again with another question as I got further in my book. The chapter I am in covers structres, abstract data and classes. I only read through to the end of the coverage on...
5
by: achrist | last post by:
Here's a program: #include <stdio.h> int main(int argc, char **argv) { double an_array = {0.0, 1.0, 2.0, 3.0, 4.0}; typedef struct a_struct {double v0, v1, v2,v3, v4;} a_type; typedef...
11
by: theshowmecanuck | last post by:
As a matter of academic interest only, is there a way to programmatically list the 'c' data types? I am not looking for detail, just if it is possible, and what function could be used to...
5
by: Shwetabh | last post by:
Hi everyone. My question is, why are data structures implemented only with struct data type? Why not union when it is more efficient as compared with structures? Thanks in advance
4
by: emma middlebrook | last post by:
Hi Straight to the point - I don't understand why System.Array derives from IList (given the methods/properties actually on IList). When designing an interface you specify a contract. Deriving...
10
by: jack | last post by:
Hi guys, I am working on a project which requires an implementation of discrete event simulation in C using linked lists. I would greatly appreciate if someone could provide with some sources...
18
by: Steven | last post by:
Hi I'm new to js so this prob is a simple question but I haven't been able to solve it. I have 2 text fields which let me pick a graphic file and want to display then in 2 image place holders so...
15
by: sethukr | last post by:
Hi everybody, While running the following program in GCC, i'm very much screwed. main() { char *ptr1; char arr; int i; char *ptr2;
0
by: Art Cummings | last post by:
Good morning all. I just finished an assignment using structures. In this assignment I used an array of structures. What I would have liked was to use an array of structures with a function. ...
4
by: Marcin Kasprzak | last post by:
Hello Guys, Silly question - what is the most elegant way of compiling a code similar to this one? <code> typedef struct a { b_t *b; } a_t; typedef struct b {
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
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
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...
0
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...
0
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...

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.