I have a business object with three columns (int year, int month and double value) bound to the GridView.
When the user adds a new row or edits an existing one, some cell validation takes place.
This is an example property of the business object
(month == value)
month = value;
DateTime(t.Year, value, t.Day, t.Hour, t.Minute, t.Second);
When the user enters 13 or something else that is not a valid month number, the "new DateTime()" call will throw an exception which will be caught, and then in turn, a new exception will be thrown and the message will be shown to the user in a nice red tooltip.
However, if I enter something like 1354684635135746876510, the control will be unable to fit that into my integer property so the Exception with the message "Input is not in a correct format" will be thrown. The message is in English, and I need to localize this. Obviously I can't edit .NET's exceptions (nor should I). But how can I solve this? I'd like to be able to validate the cells with my own messages supplied, no matter what is entered. Is this possible?