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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with forcing formulas to recalculate

Thread ID:





73059 Apr 17,2008 08:08 PM UTC May 1,2008 12:35 PM UTC WinForms 3
Tags: GridControl
Asked On April 17, 2008 08:08 PM UTC


I have CellA which contains a formula referencing CellB, while CellB contains another formula. If within my code I try to force all the formulae to recalculate using GridFormulaEngine.RecalculateRange, I still can not get the result for CellA. How would I get the result for CellA in code? I've attached a sample which illustrates this problem when you try to edit cellA3 or cellA4.

The temporary workaround I have is to specifically force a recalculate on CellA only (instead of all the cells), but I would like to just get every cell to recalculate.



Yavanaarasi G [Syncfusion]
Replied On April 22, 2008 12:36 PM UTC

Hi Omar,

Sorry for the delay in responding.

I am able to see the issue that you mentioned here. But the issue has been solved by instead of using the FormulaTag , you can use the FormattedText to get the calculated value.

Please refer the below code snippet:

Dim result1, result2 As String
result1 = GridControl1.Model(1, 1).FormattedText
If result1 = "" Then result1 = "NULL"
Catch ex As NullReferenceException
result1 = "NULL"
End Try

Here is the modified sample:


Please try this and let me know if this helps.


Replied On April 23, 2008 02:06 PM UTC

Thanks for your reply.

Actually, I'm aware of formattedtext but that won't work for me because I have various cell formatting which I didn't show in the sample, and I need the underlying value not the formatted value.

While inefficient, I guess I will just use the workaround I specified above forcing individual cells to calculate.

Is this a bug?

Thanks for your help.

Jisha Joy [Syncfusion]
Replied On May 1, 2008 12:35 PM UTC

Hi Omar,

This not a bug. We can get the recalculated values through FormattedText property.

Let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon