Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1934
Divide by zero exception.
posted

 I set a bunch of named references in my code which the user can then use in formulas through the formula builder.  Some of the calculations involve dividing by that value, which can be 0.  Instead of forcing the users to test if that value is 0 when dividing by it is there a way to catch this error?

 None of the events of the UltraCalcManager fire but there is a OverflowException thrown when setting the formula property of the column.  I set the FormulaErrorValue of the column but I still receive the exception.  How can I prevent this from occurring?

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    I'm not sure what you mean. If a formula results in a division by 0 error, there should not be an exception. The cell will simply show error code like "#DIV0".

    If you are getting an exception, then something is wrong. Either the exception is occurring in your code or it's a bug in the grid or the calc manager. 

    Are you sure this is not just a first chance exception that is being caught? 

     

Children