G
Guest
Is it possible to for a custom control to have 2 properties bound to 2
different fields from the same ADO.NET datasource. I noticed when writing
updates to my datasource only 1 field or property from the control is written.
For example....
Custom control:
public class MyControl : Usercontrol
{
[Bindable(true)]
public String PropA
{ get { return valueA; } }
[Bindable(true)]
public String PropB
{ get { return valueB; } }
}
Form Code
this.customControl.DataBindings.Add(new System.Windows.Forms.Binding
("PropA", datasource, "FieldA", true));
this.customControl.DataBindings.Add(new
System.Windows.Forms.Binding("PropB", datasource, "FieldB", true));
Regards
different fields from the same ADO.NET datasource. I noticed when writing
updates to my datasource only 1 field or property from the control is written.
For example....
Custom control:
public class MyControl : Usercontrol
{
[Bindable(true)]
public String PropA
{ get { return valueA; } }
[Bindable(true)]
public String PropB
{ get { return valueB; } }
}
Form Code
this.customControl.DataBindings.Add(new System.Windows.Forms.Binding
("PropA", datasource, "FieldA", true));
this.customControl.DataBindings.Add(new
System.Windows.Forms.Binding("PropB", datasource, "FieldB", true));
Regards