System.Windows.Forms.ControlBindingsCollection.Add Method

Creates a binding that binds the specified control property to the specified data member of the specified data source, optionally enabling formatting, propagating values to the data source based on the specified update setting, and adding the binding to the collection.

Syntax

public Binding Add (string propertyName, object dataSource, string dataMember, bool formattingEnabled, DataSourceUpdateMode updateMode)

Parameters

propertyName
The name of the control property to bind.
dataSource
An object representing the data source.
dataMember
The property or list to bind to.
formattingEnabled
true to format the displayed data; otherwise, false.
updateMode
One of the System.Windows.Forms.DataSourceUpdateMode values.

Returns

The newly created System.Windows.Forms.Binding.

Remarks

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0