A
Ahmad A. Rahman
Hi Wizards,
I have a data set and I bound it to 2 combobox (say ComboBox1 and ComboBox2)
using ComboBox1.DataSource = MyDataSet and it worked well. That also means
that when I select an item from ComboBox1, then SelectedItem in ComboBox2
will also changed respectively, as well.
However, the problem is when I tried to bind the same dataset to a TextBox
using:
TextBox1.DataBinding.Add(new Binding("Text", MyDataSet.Tables["Table1"],
"MyDataColumn"));
It happened to be that, when selectedItem is changed in ComboBox1, the data
in TextBox1.Text does not changed. Is there any other codes/method/event
that I missed? Please note that the DataTable in combobox1 and TextBox1 is
the same. The Text in TextBox should have changed as well, right?
Please help!
I have a data set and I bound it to 2 combobox (say ComboBox1 and ComboBox2)
using ComboBox1.DataSource = MyDataSet and it worked well. That also means
that when I select an item from ComboBox1, then SelectedItem in ComboBox2
will also changed respectively, as well.
However, the problem is when I tried to bind the same dataset to a TextBox
using:
TextBox1.DataBinding.Add(new Binding("Text", MyDataSet.Tables["Table1"],
"MyDataColumn"));
It happened to be that, when selectedItem is changed in ComboBox1, the data
in TextBox1.Text does not changed. Is there any other codes/method/event
that I missed? Please note that the DataTable in combobox1 and TextBox1 is
the same. The Text in TextBox should have changed as well, right?
Please help!