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.
Unfortunately, activation email could not send to your email. Please try again.

Haivng trouble with a formula not recalculating after cellvalue is changed

Thread ID:





63765 Jul 9,2007 03:57 PM Jul 9,2007 04:15 PM Windows Forms 1
Tags: GridControl
Asked On July 9, 2007 03:57 PM


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 04:15 PM

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.

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.