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

Haivng trouble with a formula not recalculating after cellvalue is changed

Thread ID:





63765 Jul 9,2007 07:57 PM UTC Jul 9,2007 08:15 PM UTC WinForms 1
Tags: GridControl
Asked On July 9, 2007 07:57 PM UTC


Lets say I have 4 cells in my Syncfusion grid. CellC contains a formula referencing CellA and CellB, and CellA is updated through my code whenever CellD is changed. If I change the value of CellA through data entry, then CellC is updated correctly. However, if I update CellD through data entry, then CellA is updated through my code, but CellC does not update with the new CellA value.

When the user enters a value into CellD, I update the value of CellA in code during the CurrentCellValidating event as follows:
gridstyleinfo.CellValue = newvalue
gridmodel.Data.Item(row,col) = gridstyleinfo.Store

I have tried refreshing the grid and also the gridmodel. What do I need to do to get CellC to update after CellA is updated through code instead of data entry?

Thanks in advance!

haneefm [Syncfusion]
Replied On July 9, 2007 08:15 PM UTC

Hi Omar,

If you want to force a range of cells to recalculate, you can use code like:

GridFormulaCellModel model = (GridFormulaCellModel)this.gridControl1.CellModels["FormulaCell"];
GridFormulaEngine engine = model.Engine;
engine.RecalculateRange(range, true);

Best regards,


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