Template ControlBind Method
This is used to bind controls to the row source. Derived controls must override this to provide data
binding support even if they contain no bound controls.
Definition
Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
C#
protected virtual void Bind()VB
Protected Overridable Sub BindC++
protected:
virtual void Bind()F#
abstract Bind : unit -> unit
override Bind : unit -> unit Remarks
This will not be called until the template is scrolled into view. This saves time and
resources during the initial startup phase of a form that contains a data list control. Templates
are re-bound under many conditions. If adding bindings to controls manually, be sure to clear the
DataBindings collection on all bound controls first. A better alternative is to use the
overloaded AddBinding(Control, String, String) method as it will take care of that for
you.
Example
C#
protected override void Bind()
{
this.AddBinding(txtFName, "Text", "FirstName");
this.AddBinding(txtLName, "Text", "LastName");
this.AddBinding(txtAddress, "Text", "Address");
this.AddBinding(txtCity, "Text", "City");
this.AddBinding(cboState, "SelectedValue", "State");
this.AddBinding(txtZip, "Text", "Zip");
this.AddBinding(udcSumValue, "Text", "SumValue");
}VB
Protected Overrides Sub Bind()
Me.AddBinding(txtFName, "Text", "FirstName")
Me.AddBinding(txtLName, "Text", "LastName")
Me.AddBinding(txtAddress, "Text", "Address")
Me.AddBinding(txtCity, "Text", "City")
Me.AddBinding(cboState, "SelectedValue", "State")
Me.AddBinding(txtZip, "Text", "Zip")
Me.AddBinding(udcSumValue, "Text", "SumValue")
End SubC++
No code example is currently available or this language may not be supported.F#
No code example is currently available or this language may not be supported.Exceptions
| NotImplementedException | This is thrown if the method is not overridden and the base implementation is called. |