Posted 5 November 2017, 8:20 pm EST
Hi Deepak,
Thanks for the response.
I tried the sample application provided by you. It is working fine if we have formula for only 1 cell.
Tested scenario - I applied formula for 3 cells C1, D1, E1 which depends on A1 and B1. I am changing the color of all the 3 formula based cells when changes for A & B occurs. In this case the color of only c1 is getting changed i.e., the event is not firing for D1 and E1.
I need an event to be fired when any of the formula based cell is updated.
Below is the sample code I tried . please provide your suggestions.
private void Form1_Load(object sender, EventArgs e)
{
fpSpread1.ActiveSheet.Cells[0, 2].Formula = “SUM(A1,B1)”;
fpSpread1.ActiveSheet.Cells[0, 3].Formula = “SUM(A1,B1)”;
fpSpread1.ActiveSheet.Cells[0, 4].Formula = “SUM(A1,B1)”;
defModel =(FarPoint.Win.Spread.Model.DefaultSheetDataModel) fpSpread1.ActiveSheet.Models.Data;
defModel.Changed += DefModel_Changed;
}
private void DefModel_Changed(object sender, FarPoint.Win.Spread.Model.SheetDataModelEventArgs e)
{
//MessageBox.Show("data model change");
fpSpread1.ActiveSheet.Cells[e.Row, e.Column].ForeColor = Color.Red;
}
Thanks,
Sushma.