Spread for ASP.NET 11 Product Documentation
AddFormula Method
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FormulaExtender Class : AddFormula Method
The control ID (server side only)
The formula
Adds or updates the control formula.
Syntax
'Declaration
 
Public Sub AddFormula( _
   ByVal controlId As String, _
   ByVal formula As String _
) 
'Usage
 
Dim instance As FormulaExtender
Dim controlId As String
Dim formula As String
 
instance.AddFormula(controlId, formula)
public void AddFormula( 
   string controlId,
   string formula
)

Parameters

controlId
The control ID (server side only)
formula
The formula
Example
This example displays a cell value in a text box.
FpSpread1.ActiveSheetView.Cells[0, 0].Value = 2;
FpSpread1.ActiveSheetView.Cells[1, 0].Value = 3;
FormulaExtender1.AddFormula("textBox2", "[FpSpread1]Sheet1!A2");
FpSpread1.ActiveSheetView.Cells(0, 0).Value = 2
FpSpread1.ActiveSheetView.Cells(1, 0).Value = 3
FormulaExtender1.AddFormula("textBox2", "[FpSpread1]Sheet1!A2")
See Also

Reference

FormulaExtender Class
FormulaExtender Members