KristianH
December 9th, 2002, 04:49 AM
Hi there
This is probably a newbie question but here it goes:
I have through databinding and a dataset, bound data to a combobox:
Combobox1.DataSource = Dataset1.cbdata.DefaultView
Combobox1.ValueMember = Dataset1.cbdata.cbdataIDColumn.ToString
Combobox1.DisplayMember = Dataset1.cbdata.cbdataColumn.ToString
Now the thing is this I have a second combobox (Combobox2) that I have bound to the same data:
Combobox2.DataSource = Dataset1.cbdata.DefaultView
Combobox2.ValueMember = Dataset1.cbdata.cbdataIDColumn.ToString
Combobox2.DisplayMember = Dataset1.cbdata.cbdataColumn.ToString
Now in my form, at runtime when I choose something in Combobox1, Combobox2 automatically gets the same value??? It changes as if It was set to be equal to combobox1 in some way, but I have no such code at all.
I have this problem (or feature?) when using dataview's as well.
Any help would be appreciated greatly....
This is probably a newbie question but here it goes:
I have through databinding and a dataset, bound data to a combobox:
Combobox1.DataSource = Dataset1.cbdata.DefaultView
Combobox1.ValueMember = Dataset1.cbdata.cbdataIDColumn.ToString
Combobox1.DisplayMember = Dataset1.cbdata.cbdataColumn.ToString
Now the thing is this I have a second combobox (Combobox2) that I have bound to the same data:
Combobox2.DataSource = Dataset1.cbdata.DefaultView
Combobox2.ValueMember = Dataset1.cbdata.cbdataIDColumn.ToString
Combobox2.DisplayMember = Dataset1.cbdata.cbdataColumn.ToString
Now in my form, at runtime when I choose something in Combobox1, Combobox2 automatically gets the same value??? It changes as if It was set to be equal to combobox1 in some way, but I have no such code at all.
I have this problem (or feature?) when using dataview's as well.
Any help would be appreciated greatly....