Spread for ASP.NET 9.0 Product Documentation
AutoCalculation Property (ICalculationSupport)
Example 


Gets or sets whether the control automatically recalculates each formula in the sheet when the contents of dependent cells change.
Syntax
'Declaration
 
Property AutoCalculation As Boolean
'Usage
 
Dim instance As ICalculationSupport
Dim value As Boolean
 
instance.AutoCalculation = value
 
value = instance.AutoCalculation
bool AutoCalculation {get; set;}

Property Value

true to automatically recalculate formulas; false otherwise
Example
FarPoint.Web.Spread.Model.ICalculationSupport cs; 
FpSpread1.ActiveSheetView.SetValue(0, 0, 20); 
FpSpread1.ActiveSheetView.SetValue(0, 1, 10); 
FpSpread1.ActiveSheetView.SetFormula(3, 0, "SUM(A1,B1)"); 

FpSpread1.ActiveSheetView.AutoCalculation = false; 
FpSpread1.ActiveSheetView.SetValue(0, 1, 100); 
cs = (FarPoint.Web.Spread.Model.ICalculationSupport)FpSpread1.ActiveSheetView.DataModel; 
cs.RecalculateAll(); 
Dim cs As FarPoint.Web.Spread.Model.ICalculationSupport
FpSpread1.ActiveSheetView.SetValue(0, 0, 20)
FpSpread1.ActiveSheetView.SetValue(0, 1, 10)
FpSpread1.ActiveSheetView.SetFormula(2, 0, "SUM(A1,B1)")

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim cs As FarPoint.Web.Spread.Model.ICalculationSupport
    FpSpread1.ActiveSheetView.AutoCalculation = False
    FpSpread1.ActiveSheetView.SetValue(0, 1, 100)
    cs = FpSpread1.ActiveSheetView.DataModel
    cs.RecalculateAll()
End Sub
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

ICalculationSupport Interface
ICalculationSupport Members

 

 


Copyright © GrapeCity, inc. All rights reserved.