A problem with DataBinding. [modified]
-
I have 2 tables >>Tb_orders (date, ... , id_cust1, id_cust2) >>Tb_customers(id_cust, name ...) and I need to edit the fields id_cust1, id_cust2 using ComboBox
cBox1.DataSource = Tb_customers;
cBox1.DisplayMember = "name";
cBox1.ValueMember = "id_cust";
cBox1.DataBindings.Add("SelectedValue", Tb_orders, "id_cust1");
cBox2.DataSource = Tb_customers;
cBox2.DisplayMember = "name";
cBox2.ValueMember = "id_cust";
cBox2.DataBindings.Add("SelectedValue", Tb_orders, "id_cust2");everything is clear but cBox1 and cBox2 have the same value. I dont know what I have to do..
modified on Saturday, January 31, 2009 2:03 AM
-
I have 2 tables >>Tb_orders (date, ... , id_cust1, id_cust2) >>Tb_customers(id_cust, name ...) and I need to edit the fields id_cust1, id_cust2 using ComboBox
cBox1.DataSource = Tb_customers;
cBox1.DisplayMember = "name";
cBox1.ValueMember = "id_cust";
cBox1.DataBindings.Add("SelectedValue", Tb_orders, "id_cust1");
cBox2.DataSource = Tb_customers;
cBox2.DisplayMember = "name";
cBox2.ValueMember = "id_cust";
cBox2.DataBindings.Add("SelectedValue", Tb_orders, "id_cust2");everything is clear but cBox1 and cBox2 have the same value. I dont know what I have to do..
modified on Saturday, January 31, 2009 2:03 AM
Try to use diffrent data source. I mean create separate Data source object.
-
Try to use diffrent data source. I mean create separate Data source object.