Spread Windows Forms 12.0 Product Documentation
MaximumIterations Property (DefaultSheetDataModel)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > DefaultSheetDataModel Class : MaximumIterations Property
Gets or sets the maximum number of iterations for calculations with circular references.
Syntax
'Declaration
 
Public Property MaximumIterations As Integer
'Usage
 
Dim instance As DefaultSheetDataModel
Dim value As Integer
 
instance.MaximumIterations = value
 
value = instance.MaximumIterations
public int MaximumIterations {get; set;}

Property Value

Integer number of iterations
Exceptions
ExceptionDescription
Specified number of iterations is out of range; must be an integer between 1 and 32767
Example
This example specifies the maximum amount of change below which iterations (of recalculation) stop.
Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(10, 10)
FpSpread1.ActiveSheet.Models.Data = dataModel
dataModel.SetValue(0, 0, 20)
dataModel.SetValue(0, 1, 10)
dataModel.SetValue(0, 2, 10)
dataModel.Iteration = True
dataModel.MaximumIterations = 3
dataModel.MaximumChange = 600
dataModel.SetFormula(0, 0, "B1+C1")
dataModel.SetFormula(0, 2, "A1*3")
FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(8, 8);
fpSpread1.ActiveSheet.Models.Data = dataModel;
dataModel.SetValue(0, 0, 20);
dataModel.SetValue(0, 1, 10);
dataModel.SetValue(0, 2, 10);
dataModel.Iteration = true;
dataModel.MaximumIterations = 3;
dataModel.MaximumChange = 600;
dataModel.SetFormula(0, 0, "B1+C1");
dataModel.SetFormula(0, 2, "A1*3"); 
See Also

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members