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.

SaveCellInfo not called

Thread ID:

Created:

Updated:

Platform:

Replies:

64261 Jul 17,2007 12:12 PM Jul 17,2007 05:20 PM Windows Forms 5
loading
Tags: GridControl
Jerry Lawrence
Asked On July 17, 2007 12:12 PM

Version 4.4.0.46

I have two grids, Equipment and Telephones. Formulas in Telephones reference values in Equipment.

In grid Telephones, I have a cell with formula =SUM(Equipment!SmallPhones.EquipmentAnnualRevenue) that is not calling SaveCellInfo when a value is changed in the Equipment grid. The formula is evaluated because the value changes in its cell, it is just that SaveCellInfo is not called for this cell.

What is odd is that when other formulas in the Telephone grid are evaluated (during the same operation), SaveCellInfo is called for those cells.

Why would SaveCellInfo not be call when a formula is evaluated/the value changes?

SaveCellInfo is the only event I am handling.

Thanks,

Jerry


haneefm [Syncfusion]
Replied On July 17, 2007 01:40 PM

Hi Jeffery,

When using the formula engine with a grid, there are situations where SaveCellInfo may not be called (even though the engine does update the cell properly). This may happen when some formulas are not visible, or may depend upon the order of the appearance of the formulas in the grid and is due to internal painting optimizations within GridControlBase. To force the calling of SaveCellInfo in these situations , you can set this property in Form.Load:

[c#]
GridFormulaEngine engine = ((GridFormulaCellModel)gridControl1.Model.CellModels["FormulaCell"]).Engine;
engine.ForceSaveCellInfo = true;

Best regards,
Haneef

haneefm [Syncfusion]
Replied On July 17, 2007 01:42 PM

Hi Jerry,

My apologies for addressing to the wrong person, it was meant for you.

When using the formula engine with a grid, there are situations where SaveCellInfo may not be called (even though the engine does update the cell properly). This may happen when some formulas are not visible, or may depend upon the order of the appearance of the formulas in the grid and is due to internal painting optimizations within GridControlBase. To force the calling of SaveCellInfo in these situations , you can set this property in Form.Load:

[c#]
GridFormulaEngine engine = ((GridFormulaCellModel)gridControl1.Model.CellModels["FormulaCell"]).Engine;
engine.ForceSaveCellInfo = true;

Best regards,
Haneef

Jerry Lawrence
Replied On July 17, 2007 02:49 PM

I am currently calling ForceSaveCellInfo. Here is the code. Note the ForceSaveCellInfo = true toward the end.

int sheetFamilyID = GridFormulaEngine.CreateSheetFamilyID();
GridFormulaEngine.RegisterGridAsSheet("Analysis", _gridAnalysis.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("Workflow", _gridWorkflow.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("MiscRevenue", _gridMiscellaneousRevenue.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("Equipment", _gridEquipment.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("LocalService", _gridLocalService.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("Telephones", _gridTelephones.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("Installation", _gridInstallation.Model, sheetFamilyID);
GridFormulaEngine.RegisterGridAsSheet("Data", _gridData.Model, sheetFamilyID);

_gridAnalysis.TableStyle.CellType = "FormulaCell";
_gridWorkflow.TableStyle.CellType = "FormulaCell";
_gridMiscellaneousRevenue.TableStyle.CellType = "FormulaCell";
_gridEquipment.TableStyle.CellType = "FormulaCell";
_gridLocalService.TableStyle.CellType = "FormulaCell";
_gridTelephones.TableStyle.CellType = "FormulaCell";
_gridInstallation.TableStyle.CellType = "FormulaCell";
_gridData.TableStyle.CellType = "FormulaCell";
_engine = ((GridFormulaCellModel)_gridAnalysis.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

Administrator [Syncfusion]
Replied On July 17, 2007 04:19 PM

Try setting that property on all your formula engines. The RegisterGridAsSheet just sets up all the engines to share the same data stores, but there are still distinct engine instances for each grid.

_engine = ((GridFormulaCellModel)_gridAnalysis.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

_engine = ((GridFormulaCellModel)_gridWorkflow.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

_engine = ((GridFormulaCellModel)_gridMiscellaneousRevenue.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

_engine = ((GridFormulaCellModel)_gridEquipment.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

_engine = ((GridFormulaCellModel)_gridLocalService.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

_engine = ((GridFormulaCellModel)_gridTelephones.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

_engine = ((GridFormulaCellModel)_gridInstallation.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

_engine = ((GridFormulaCellModel)_gridData.Model.CellModels["FormulaCell"]).Engine;
_engine.ForceSaveCellInfo = true;

Jerry Lawrence
Replied On July 17, 2007 05:20 PM

That worked. Thanks!

CONFIRMATION

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.

;