Spread Windows Forms 8.0 Product Documentation
Allowing the User to Enter Formulas

In many of the cell types, users can type in a formula by simply starting with an equals sign (=). You do not need to set a property  to allow this. How the result is displayed depends on the cell type. For example, an integer cell type displays the result as an integer, even if the result of the formula is not an integer. In this case, a number may appear rounded. For currency and date cells, specific formatting can be defined. For more information on setting various cell types, refer to Working with Editable Cell Types.

For information on the floating formula bar, where users can type in formulas and select cells dynamically, refer to Setting up the Formula Text Box.

Using the Properties Window

  1. At design time, in the Properties window (in the Behavior category), select the AllowUserFormulas property.
  2. Select True from the drop-down list to allow users to enter formulas, or select False to prohibit them.

Using a Shortcut

Allow the user to enter formulas by setting the AllowUserFormulas property for the component or the sheet.

Example

This example code sets the Spread component to allow users to enter formulas.

C#
Copy Code
fpSpread1.AllowUserFormulas = true;
VB
Copy Code
FpSpread1.AllowUserFormulas = True

Using Code

Allow the user to enter formulas by setting the AllowUserFormulas property for the component or the sheet.

Example

This example code sets the child sheet to allow users to enter formulas.

C#
Copy Code
FarPoint.Win.Spread.SpreadView sv = fpSpread1.GetRootWorkbook();
sv.AllowUserFormulas = true;
VB
Copy Code
Dim sv As FarPoint.Win.Spread.SpreadView = FpSpread1.GetRootWorkbook
sv.AllowUserFormulas = True 

Using the Spread Designer

  1. Select the Spread component (or select Spread from the pull-down menu).
  2. In the property list for the component (in the Behavior category), select the AllowUserFormulas property and select the value True.
  3. From the File menu choose Apply and Exit to apply your changes to the component and exit Spread Designer.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback