Spread Windows Forms 12.0 Product Documentation
ComparedValue Property

FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > CompareValueValidator Class : ComparedValue Property
Gets or sets the compared target value.
Public Property ComparedValue As Object
Dim instance As CompareValueValidator
Dim value As Object
instance.ComparedValue = value
value = instance.ComparedValue
public object ComparedValue {get; set;}

Property Value

A System.Object value that represents the compared target value. The default is a null reference (Nothing in Visual Basic).
This example uses the compare value validation.
//Type a value in cell 1,1
FarPoint.Win.Spread.TipNotify tnote = new FarPoint.Win.Spread.TipNotify();
tnote.ToolTipText = "Greater than 5";
tnote.ToolTipTitle = "Error";
tnote.ToolTipIcon = ToolTipIcon.Error;
FarPoint.Win.Spread.CompareValueValidator compare = new FarPoint.Win.Spread.CompareValueValidator();
compare.ComparedOperator = FarPoint.Win.Spread.ValidateComparisonOperator.GreaterThan;
compare.ComparedValue = 5;
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare);
'Type a value in cell 1,1
Dim tnote As New FarPoint.Win.Spread.TipNotify()
tnote.ToolTipText = "Greater than 5"
tnote.ToolTipTitle = "Error"
tnote.ToolTipIcon = ToolTipIcon.Error
Dim compare As New FarPoint.Win.Spread.CompareValueValidator()
compare.ComparedOperator = FarPoint.Win.Spread.ValidateComparisonOperator.GreaterThan
compare.ComparedValue = 5
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare)
See Also


CompareValueValidator Class
CompareValueValidator Members