Input for WinForms | ComponentOne
Handling Errors / Incorrect Format in Displaying Data
In This Topic
    Incorrect Format in Displaying Data
    In This Topic

    The Input control provides the ErrorInfo class to provides the settings affecting error handling. 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.