Spread Windows Forms 11.0 Product Documentation
MaxValue Property (RangeValidator)
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > RangeValidator Class : MaxValue Property
Gets or sets the upper limit of the specified value.
Syntax
'Declaration
 
Public Property MaxValue As Object
'Usage
 
Dim instance As RangeValidator
Dim value As Object
 
instance.MaxValue = value
 
value = instance.MaxValue
public object MaxValue {get; set;}

Property Value

A System.Object value that represents the upper limit of the specified value.
Exceptions
ExceptionDescription
The assigned value is greater than MaxValue.
Example
This example creates a range validator.
FarPoint.Win.Spread.CellStyleNotify stylenotify = new FarPoint.Win.Spread.CellStyleNotify();
stylenotify.InvalidCellStyle.BackColor = Color.Aquamarine;
FarPoint.Win.Spread.RangeValidator rvalid = new FarPoint.Win.Spread.RangeValidator();
rvalid.MaxValue = 10;
rvalid.MinValue = 0;
rvalid.NullIsValid = true;
rvalid.RequiredType = typeof(int);
rvalid.Actions.Add(stylenotify);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalid);
Dim stylenotify As New FarPoint.Win.Spread.CellStyleNotify()
stylenotify.InvalidCellStyle.BackColor = Color.Aquamarine
Dim rvalid As New FarPoint.Win.Spread.RangeValidator()
rvalid.MaxValue = 10
rvalid.MinValue = 0
rvalid.NullIsValid = True
rvalid.RequiredType = GetType(Integer)
rvalid.Actions.Add(stylenotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), rvalid)
See Also

Reference

RangeValidator Class
RangeValidator Members