您好,用这个事件可以判断到
private void Form1_Load(object sender, System.EventArgs e)
{
fpSpread1.ActiveSheet.Models.Data = defModel;
this.defModel.Changed += new FarPoint.Win.Spread.Model.SheetDataModelEventHandler(this.defModel_Changed);
}
private void defModel_Changed(object sender, FarPoint.Win.Spread.Model.SheetDataModelEventArgs e)
{
switch (e.Type)
{
case FarPoint.Win.Spread.Model.SheetDataModelEventType.CellsUpdated:
listBox1.Items.Add(e.Type.ToString());
break;
case FarPoint.Win.Spread.Model.SheetDataModelEventType.RowsAdded:
listBox1.Items.Add(e.Type.ToString());
break;
case FarPoint.Win.Spread.Model.SheetDataModelEventType.RowsRemoved:
listBox1.Items.Add(e.Type.ToString());
break;
case FarPoint.Win.Spread.Model.SheetDataModelEventType.ColumnsAdded:
listBox1.Items.Add(e.Type.ToString());
break;
case FarPoint.Win.Spread.Model.SheetDataModelEventType.ColumnsRemoved:
listBox1.Items.Add(e.Type.ToString());
break;
case FarPoint.Win.Spread.Model.SheetDataModelEventType.ModelUpdated:
listBox1.Items.Add(e.Type.ToString());
break;
}
} |