Creates a binding that binds the specified control property to the specified data member of the specified data source, optionally enabling formatting with the specified format string, propagating values to the data source based on the specified update setting, setting the property to the specified value when DBNull is returned from the data source, setting the specified format provider, and adding the binding to the collection.
- 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.
- nullValue
The object to be applied to the bound control property if the data source value is DBNull.
- formatString
One or more format specifier characters that indicate how a value is to be displayed
- formatInfo
An implementation of IFormatProvider to override default formatting behavior.
![]()
The newly created System.Windows.Forms.Binding.
Calling the ControlBindingsCollection.Add(string, object, string, bool, DataSourceUpdateMode, object, string, IFormatProvider) method raises the BindingsCollection.CollectionChanged event.