You can use the formula extender control to calculate values from the Spread control and display the result in other controls such as a text box control.
The following standard .NET controls are supported with the formula extender control:
The following HTML controls are supported with the formula extender control:
Valid formula formats include the control name in brackets and the sheet name. For example:
The FormulaExtender control is located in the Visual Studio toolbox under the GrapeCity Spread section as shown in the following image.
Use the following steps to use the formula extender control:
The following example adds a cell value to a text box control.
C# |
Copy Code
|
---|---|
FpSpread1.ActiveSheetView.Cells[0, 0].Value = 2; FpSpread1.ActiveSheetView.Cells[1, 0].Value = 3; FormulaExtender1.AddFormula("textBox2", "[FpSpread1]Sheet1!A2"); |
VB |
Copy Code
|
---|---|
FpSpread1.ActiveSheetView.Cells(0, 0).Value = 2 FpSpread1.ActiveSheetView.Cells(1, 0).Value = 3 FormulaExtender1.AddFormula("textBox2", "[FpSpread1]Sheet1!A2") |