Hi,
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!
HA
haneefm
Syncfusion Team
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,
Haneef