We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Problem in AddNamedRange and Parenthese Priorities

I see a problem in calculation and I have included the sample code that I extracted from my application. In this sample code there are one comboBox and two grid controls that they are registered under one Engine. I have defined some variables in top grid (VariablesGrid) and I want to use them in lower grid (CharacteristicGrid). In Lower grid in second column I had a formula "=Rad". Which Rad =((Ztot / 2)^2) + (Ztot / 2) when Ztot =ZREACH - ZOFFSET and the value for ZREACH = 10 and ZOFFSET = -2 To see the problem run the sample code and choice the last items (TOMATO) from the drop down list in comboBox. Then you will see some labels and values defined in top grid. Then you will see in Lower grid Radius and the value of 24. The correct value should be 42. Rad = ((12 / 2) ^2) + (12 / 2) = 42. In run time if you copy and paste =((Ztot / 2)^2) + (Ztot / 2) in one of the cell in lower grid you will get the correct answer of 42. So where did the value of 24 come from???? Perhaps it comes from a mistake in parsing code. It seems you calculate the following: ((Ztot / 2)^2 + Ztot) / 2 which is not equivalent to my formula. To get the sense of the problem in my sample play with formula you will see the following: Ztot / 2 = 6 correct (Ztot / 2) ^2 = 36 correct (Ztot / 2)^2 + Ztot = 48 correct ((Ztot/2)^2 + (Ztot / 2) = 24 which is wrong. We are using Syncfusion 4.1.0.62

Parenthese.zip

3 Replies

AD Administrator Syncfusion Team April 5, 2006 03:47 PM UTC

Hi Najmeh, Sorry for the late response. In your attachment we could not find any project file to run the sample. Please post the sample again. Thanks for the patience. Best regards, Madhan


NJ Najmeh Joze-khajavi April 5, 2006 06:26 PM UTC

Sorry for bad zip file. Please try again.

Parenthese1.zip


AD Administrator Syncfusion Team April 6, 2006 08:51 AM UTC

Hi Najmeh, Your D-Trac incident ( # 24709 ) has been updated. Please refer to your incident for more details. Thanks for the patience. Best regards, Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon