Occurs when the value of a data-bound control changes.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The Format and events allow you to create custom formats for displaying data. For example, if the data in a table is of type Decimal, you can display the data in the local currency format by setting the Value property of the ConvertEventArgs to the formatted value in the Format event. You must consequently unformat the displayed value in the event.
Theevent occurs under the following conditions:
For more information about handling events, see Handling and Raising Events.
The following code example creates a Binding, adds a ConvertEventHandler delegate to both the and Format events, and adds the Binding to the BindingsCollection of a TextBox control through the DataBindings property. The DecimalToCurrencyString event delegate, added to the Format event, formats the bound value (a Decimal type) as currency using the ToString method. The CurrencyStringToDecimal event delegate, added to the event, converts the value displayed by the control back to the Decimal type.
Available since 1.1