Template ControlAdd Binding(Control, String, String, Boolean) Method
This method and its overloads can be used to simplify adding data bindings to controls contained in
the template.
Definition
Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
The newly created data binding
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
C#
public Binding AddBinding(
Control control,
string controlProperty,
string dataMember,
bool clearBindings
)VB
Public Function AddBinding (
control As Control,
controlProperty As String,
dataMember As String,
clearBindings As Boolean
) As BindingC++
public:
Binding^ AddBinding(
Control^ control,
String^ controlProperty,
String^ dataMember,
bool clearBindings
)F#
member AddBinding :
control : Control *
controlProperty : string *
dataMember : string *
clearBindings : bool -> Binding Parameters
- control Control
- The control to which to add the data binding
- controlProperty String
- The name of the control property to bind
- dataMember String
- The property or list to which to bind
- clearBindings Boolean
- Specify true to clear all existing bindings before adding the new binding or false to keep all existing bindings.
Return Value
BindingThe newly created data binding
Remarks
This version will only clear the existing data bindings if the clearBindings
parameter is true. This version should be used with it set to false if you bind multiple properties
on the same control after the first one has been bound.