How to update databinding property
-
Hy all. I have 2 controls binded to one data source
this.LookUpEditor1.DataBindings.Add(new System.Windows.Forms.Binding "EditValue",this.my_BindingSource, "ID", true)); this.LookUpEditor1.ValueMember = "ID"; this.LookUpEditor1.DisplayedValue = "Name"; this.LookUpEditor2.DataBindings.Add(new System.Windows.Forms.Binding "EditValue",this.my_BindingSource, "ID", true)); this.LookUpEditor2.ValueMember = "ID"; this.LookUpEditor2.DisplayedValue = "NameSynonym";
DataSource record has 3 fields "ID", "Name", "NameSynonym" problem here: when i change value in first combobox it should changed in second and vice versa. How i can implement this automatically with out using events and explicit property set as what:LookUpEditor1_onValueChanges(...) { LookUpEditor2.EditValue = LookUpEditor1.EditValue; } LookUpEditor2_onValueChanges(...) { LookUpEditor1.EditValue = LookUpEditor2.EditValue; }
THANK