Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Customizing Interaction with Cell Types > Understanding Additional Features of Cell Types > Limiting Values for a Numeric Cell |
You can set the minimum and maximum values that can be entered in a cell and notify the user with a message if the entry is smaller than the minimum or larger than the maximum.
The cell types that allow you to set a minimum and maximum value for user entry are:
For other aspects of the currency cell and to assign the CurrencyCellType to a cell, refer to Setting a Currency Cell. For other aspects of the number cell and to assign the NumberCellType to a cell, refer to Setting a Number Cell. For other aspects of the currency cell and to assign the PercentCellType to a cell, refer to Setting a Percent Cell.
For information on the editable cell types, refer to Working with Editable Cell Types.
For information on other features of cell types, refer to Understanding Additional Features of Cell Types.
C# |
Copy Code
|
---|---|
FarPoint.Win.Spread.CellType.CurrencyCellType currcell = new FarPoint.Win.Spread.CellType.CurrencyCellType("Pick a number between 1 and 10!"); currcell.MinimumValue = 1; currcell.MaximumValue = 10; currcell.Multiline = true; fpSpread1.ActiveSheet.Cells[1,1].CellType = currcell; |
VB |
Copy Code
|
---|---|
Dim currcell As New FarPoint.Win.Spread.CellType.CurrencyCellType("Pick a number between 1 and 10!") currcell.MinimumValue = 1 currcell.MaximumValue = 10 currcell.Multiline = true FpSpread1.ActiveSheet.Cells(1,1).CellType = currcell |