Spread Windows Forms 11.0 Product Documentation
RecalculateAll Method (DefaultSheetDataModel)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > DefaultSheetDataModel Class : RecalculateAll Method
Evaluates all the formulas in the entire sheet (including those that have not changed since the last calculation cycle).
Syntax
'Declaration
 
Public Sub RecalculateAll() 
'Usage
 
Dim instance As DefaultSheetDataModel
 
instance.RecalculateAll()
public void RecalculateAll()
Example
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(10, 10)
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)")
dataModel.SetValue(4, 0, 100)
dataModel.SetValue(5, 0, 200)
dataModel.SetFormula(2, 2, "3*SUM(A5, A6)")
dlg = MessageBox.Show("Do you want to recalculate?", "RecalculateAll", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
dataModel.SetValue(0, 0, 50)
dataModel.RecalculateAll()
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)");
dataModel.SetValue(4, 0, 100);
dataModel.SetValue(5, 0, 200);
dataModel.SetFormula(2, 2, "3*SUM(A5, A6)");
dlg = MessageBox.Show("Do you want to recalculate?", "RecalculateAll", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
dataModel.SetValue(0, 0, 50);
dataModel.RecalculateAll();
}
See Also

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members