Spread Windows Forms 7.0 Product Documentation
Allowing the User to Enter Formulas
Support Options
Spread Windows Forms 7.0 Product Documentation > Developer's Guide > Customizing Interaction in Cells > Managing Formulas in Cells > Allowing the User to Enter Formulas

Glossary Item Box

In many of the cell types, users can type in a formula by simply starting with an equals sign (=). No special property needs to be set 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.GetRootWorkbooksv.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.
© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.