Spread Windows Forms 11.0 Product Documentation
IsValid Method (PercentCellType)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > PercentCellType Class : IsValid Method
Value to validate (as object)
Determines whether the specified value can be converted to a double-precision, floating point value and is between the minimum and maximum allowed values.
Syntax
'Declaration
 
Public Overrides Function IsValid( _
   ByVal value As Object _
) As Boolean
'Usage
 
Dim instance As PercentCellType
Dim value As Object
Dim value As Boolean
 
value = instance.IsValid(value)
public override bool IsValid( 
   object value
)

Parameters

value
Value to validate (as object)

Return Value

Boolean: true if the value can be converted to a double-precision, floating-point value and is between the minimum and maximum value; false otherwise
Remarks
The valid range of values is defined by the MinimumValue and MaximumValue properties.
Example
This examples returns if the value in the cell is valid.
FarPoint.Win.Spread.CellType.PercentCellType p = new FarPoint.Win.Spread.CellType.PercentCellType(); 
bool b; 
fpSpread1.ActiveSheet.Cells[0, 0].CellType = p; 
fpSpread1.ActiveSheet.Cells[0, 0].Value = 0.05; 
b = p.IsValid(fpSpread1.ActiveSheet.Cells[0, 0].Value); 
MessageBox.Show(b.ToString());
FarPoint.Win.Spread.CellType.PercentCellType p = new FarPoint.Win.Spread.CellType.PercentCellType(); 
bool b; 
fpSpread1.ActiveSheet.Cells[0, 0].CellType = p; 
fpSpread1.ActiveSheet.Cells[0, 0].Value = 0.05; 
b = p.IsValid(fpSpread1.ActiveSheet.Cells[0, 0].Value); 
MessageBox.Show(b.ToString());
See Also

Reference

PercentCellType Class
PercentCellType Members