Spread ASP.NET 6.0 Product Documentation
Limiting Values for a Currency Cell
Send Feedback
Spread ASP.NET 6.0 Product Documentation > Developer's Guide > Customizing with Cell Types > Working with Editable Cell Types > Limiting Values for a Currency Cell

Glossary Item Box

You can set the minimum and maximum values that can be entered in a currency cell and notify the user with a message if the entry is smaller than the minimum or larger than the maximum. This is done with MinimumValue and MaximumValue properties of the CurrencyCellType class.

Double, integer, and percent cells also support minimum and maxium values.

Currency Cell Type with Note about Min and Max Values

To assign the CurrencyCellType to a cell, refer to Setting a Currency Cell.

Return to the overview of editable cell types at Working with Editable Cell Types.

Using Code

  1. Create the currency cell type and set a custom error message.
  2. Specify the minimum or maximum value or both of a currency cell type.
  3. Assign the currency cell type to a cell.

Example

C# Copy Code
FarPoint.Web.Spread.CurrencyCellType currcell =    new FarPoint.Web.Spread.CurrencyCellType("Pick a number    between 1 and 10!"); 
currcell.MinimumValue = 1;
currcell.MaximumValue = 10;
FpSpread1.ActiveSheetView.Cells[1,1].CellType = currcell;
VB Copy Code
Dim currcell As New FarPoint.Web.Spread.CurrencyCellType("Pick a    number between 1 and 10!")
currcell.MinimumValue = 1
currcell.MaximumValue = 10
FpSpread1.ActiveSheetView.Cells(1,1).CellType = currcell

Using the Spread Designer

  1. In the work area, select the cell or cells for which you want to set the cell type.
  2. Select the Home menu.
  3. Select the SetCellType icon under the CellType section.
  4. Select the cell type and set cell properties such as MinimumValue, MaximumValue, or ErrorMessage.
  5. Select OK to close the dialog.
  6. Click Apply and Exit to close the Spread Designer.
© 2002-2012 GrapeCity, Inc. All Rights Reserved.