Spread Windows Forms 9.0 Product Documentation
Recalculate Method (DefaultSheetDataModel)
Example 


Evaluates the formulas in the sheet that have changed since the last calculation cycle.
Syntax
'Declaration
 
Public Sub Recalculate() 
'Usage
 
Dim instance As DefaultSheetDataModel
 
instance.Recalculate()
public void Recalculate()
Example
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(5, 5)
Dim dlg As DialogResult
FpSpread1.ActiveSheet.Models.Data = dataModel
dataModel.SetValue(0, 0, 10)
dataModel.SetValue(1, 0, 20)
dataModel.SetFormula(1, 1, "3*SUM(A1, A2)")
dlg = MessageBox.Show("Do you want to recalculate?", "Recalculate", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
dataModel.SetValue(0, 0, 50)
dataModel.Recalculate()
End If
FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(8, 8);
DialogResult dlg;
fpSpread1.ActiveSheet.Models.Data = dataModel;
dataModel.SetValue(0, 0, 10);
dataModel.SetValue(1, 0, 20);
dataModel.SetFormula(1, 1, "3*SUM(A1, A2)");
dlg = MessageBox.Show("Do you want to recalculate?", "Recalculate", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
dataModel.SetValue(0, 0, 50);
dataModel.Recalculate();
}
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members

 

 


Copyright © GrapeCity, inc. All rights reserved.