Hi,
This may seem like a basic question but I can’t get it to work and I can’t find an answer in the forums.
‘I create a cell at E4
grid(4,5).CellValue = 123
‘I create a formula at E3 which references that cell
grid(3,5).CellType = “FormulaCell”
grid(3,5).Text = “=Sum(E4)”
‘When I do this
grid.Model.Rows.InsertRange(3, 1)
I get a circular reference error because cell E3 is now E4. How do I put in a relative cell reference in E3’s formula so that inserting/deleting rows will adjust the cell reference accordingly.
Thanks
AD
Administrator
Syncfusion Team
June 20, 2005 08:03 PM UTC
Try setting these flags to see if this makes things work better.
dim engine As GridFormulaEngine = CType(this.gridControl1.CellModels("FormulaCell"), GridFormulaCellModel).Engine;
engine.FormulaCopyFlags = engine.FormulaCopyFlags Or GridFormulaCopyFlags.InsDelRangeReferencesUpdated
engine.FormulaCopyFlags = engine.FormulaCopyFlags OR GridFormulaCopyFlags.ClipBoardReferencesAdjusted
AD
Administrator
Syncfusion Team
June 20, 2005 09:04 PM UTC
Thanks! That did the trick!