TemplateControlAddBinding(Control, String, String, Boolean, ConvertEventHandler, ConvertEventHandler) Method
This method and its overloads can be used to simplify adding data bindings to controls contained in
the template.
Namespace: EWSoftware.ListControlsAssembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2023.4.9.0
public Binding AddBinding(
Control control,
string controlProperty,
string dataMember,
bool clearBindings,
ConvertEventHandler formatEvent,
ConvertEventHandler parseEvent
)
Public Function AddBinding (
control As Control,
controlProperty As String,
dataMember As String,
clearBindings As Boolean,
formatEvent As ConvertEventHandler,
parseEvent As ConvertEventHandler
) As Binding
public:
Binding^ AddBinding(
Control^ control,
String^ controlProperty,
String^ dataMember,
bool clearBindings,
ConvertEventHandler^ formatEvent,
ConvertEventHandler^ parseEvent
)
member AddBinding :
control : Control *
controlProperty : string *
dataMember : string *
clearBindings : bool *
formatEvent : ConvertEventHandler *
parseEvent : ConvertEventHandler -> Binding
- 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.
- formatEvent ConvertEventHandler
- An event handler for the binding's Format event if wanted
- parseEvent ConvertEventHandler
- An event handler for the binding's Parse event if wanted
BindingThe newly created data binding
This version will only clear the existing data bindings if the clearBindings
parameter is true. It will also add the specified format and parse event handlers to the binding if
they are specified. Use null if you do not want a particular handler added.