I have an application with two GridControls. I have initialized a GridFormulaEngine using:
static public GridFormulaEngine engine;
and
engine = ((GridFormulaCellModel)grid1.Model.CellModels["FormulaCell"]).Engine;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardText;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardFormula;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.InsDelRangeReferencesUpdated;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.ClipBoardReferencesAdjusted;
engine.FormulaCopyFlags |= GridFormulaCopyFlags.NamedRangeReferencesUpdated;
I then implemented a copy and paste function using a context menu. As long as the equations being copied only contain references to locations within the same grid, their references are updated correctly using the statement:
grid1[r, c].Text = engine.AdjustReferences(formulaString, rowOffset, colOffset);
However, if the formula references locations in another grid, it doesn't update the references.
Can anyone help me get this figured out?
For more detail, please refer to the attached project.
v/r
Jan
Estimator_41d38a25.zip