I have implemented a UltraGridColumn.GroupComparer routine to sort my group by rows in the ultragrid. The issue I am having is exception trapping. If I trap the exception within the GroupComparer routine, the report displays as if there was no error. If I throw an exception, it is not being caught by my calling routine. How can I abort the report without causing an unhandled exception?
Hi,
What exception are you getting?
You should really avoid calling code that could raise an exception inside an IComparer.
There is no way to catch that without catching exception on your entire application.
I have corrected all known exceptions. The problem is that this code is running in an environment where there may be some meta-data issues that I'm not aware of that could cause the ICompare to fail. Our application is actually a user control that run within a container written by our customer. They normally catch any exceptions we may miss, but it this case that does not happen and it locks up the application. I would like to be able to catch this type of exception so that it doesn't lock up the application.