ComponentOne Input for WinForms
Incorrect Format in Displaying Data
Using the C1Input Controls > Error Handling > Incorrect Format in Displaying Data

Incorrect format is possible, although generally avoided in applications that data fetched from the database or another data source does not match the format or edit mask defined in a C1Input control. In such cases, the control cannot show its value properly formatted. Although C1Input controls have reasonable default behavior handling this situation, you may want to inform the user of invalid data. This is done using the ErrorProvider property (ErrorProvider in C1Label control). If you set this property to an ErrorProvider component, C1Input uses that ErrorProvider component to signal errors when it displays invalid data (data that can’t be formatted for display in the control). It calls the ErrorProvider.SetControl method when such error is detected. Before doing that, C1Input fires the FormatError event where you can customize the error message (ErrorProvider ToolTip text) and perform other actions.

See Also