We’re developing a C# Windows Forms application, using LINQ-to-sql, databindding and the Error provider object.
The databinding causes autogenerated messages being displayed as soon as you try to enter data which is’nt allowed (for instance entering alphanumeric characters in a numeric field). But the messages being generated are not very user-friendly (input string not in correct format, value is not valid, value is not a datetime starting at pos 0, etc.).
What do you think is the best way to handle this? Turn off the autovalidation by setting “FormattingEnabled” to false on databinded controls, which means you have to handle all validations by yourself? Or perhaps extend objects to be able to override messages, for instance extend/override TypeConverter? Make custom controls which perform basic validation (like creating a textbox which only allows integers, money values, etc.)?
What I eventually did is make custom input controls which: