AD
Administrator
Syncfusion Team
August 5, 2003 05:53 AM UTC
Hi Dave,
if things go as usual there should be no excpetions at all within the grid. There are also no workarounds that come to my mind about catching exceptions for problems with Microsoft assemblies.
However, there is one type of exception that we always catch within the grid, and that is when a string gets converted to a cell value or vice versa. Also, when we do validate cell contents it is not unusual that a exception is thrown and the grid has to handle it. Also, when data are saved back to a datasource and constraints are violated exceptions might occur.
The grid will handle conversion exceptions independent of the ExceptionManager setting you specified since it is not practical to let them bubble up. That's why exceptions that are thrown while in DrawCell or SaveCell will usually not bubble up.
All other exceptions should honor the ExceptionManager setting and will bubble up based on this setting.
Grid operations should in general occur on the GUI thread. So, in 98% of the cases setting the ExceptionManager property for the GUI thread only should be just fine.
However, if there operations happening on another thread and grid code is involved that handles exceptions, then you will have to set this property for every single thread. You could do this at the start of the method where you think a exception could occur. That way you can be sure the property is set on the right thread.
Stefan