AD
Administrator
Syncfusion Team
October 12, 2007 09:33 AM UTC
After setting the formula in the cell, also set the FormulaTag to null. This should force the recomputation.
Also, you may want to use the CurrentCellMoved event instead of CurrentCellChanged.
void gridControl1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e)
{
GridCurrentCell cc = gridControl1.CurrentCell;
if (cc.RowIndex > 0 && cc.RowIndex < 5)
{
this.gridControl1[6, 1].Text = string.Format("= A5 - A{0}", cc.RowIndex);
this.gridControl1[6, 1].FormulaTag = null;
}
}