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, setting the property to the specified value when DBNull is returned from the data source, 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.
The newly created System.Windows.Forms.Binding
Calling the ControlBindingsCollection.Add(string, object, string, bool, DataSourceUpdateMode, object) method raises the BindingsCollection.CollectionChanged event.