Hi,
I have a gridControl on which certain cells are of type MonthCalendar, and the CellValueType are DateTime. If I copy and paste a bunch of values (say from an excel spreadsheet) to the grid and the value going to the DateTime cell is invalid, then an exception seems to be raised and a fuzzy string "String was not recognized as a valid DateTime." shows in the DateTime cell.
My question is how I can try and catch the entire copy and paste action and give an custom error message in a messagebox if an exception is caught. Ideally, I would like to cancel the paste action if one of the cells fails.
I tried the ClipboradCopy and ClipboradPaste events, but they don't seem to be the right events to handle.
Please see attached solution and README.doc file.
Thanks very much,
Frank
UBS
CopyPasteError.zip