Spread for ASP.NET 8.0 Product Documentation > Developer's Guide > Customizing with Cell Types > Working with Editable Cell Types > Limiting Values for a Currency Cell |
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 maximum values.
To assign the CurrencyCellType to a cell, refer to Setting a Currency Cell.
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 |