# Incorrect Format in Displaying Data

This topic discusses about Incorrect Format in Displaying Data.

## Content



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](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.ErrorInfo.ErrorProvider.html) property ([ErrorProvider](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1Label.ErrorProvider.html) in [C1Label](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1Label.html) 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](/componentone/api/win/online-input/dotnet-framework-api/C1.Win.C1Input.4.8/C1.Win.C1Input.C1TextBox.FormatError.html) event where you can customize the error message (ErrorProvider ToolTip text) and perform other actions.

## See Also

[User Input Errors](/componentone/docs/win/online-input/usingthec1inputcontr/errorhandling/userinputerrors)