GrapeCity SPREAD for Windows Forms 12.0J
ComparedOperator プロパティ (CompareValueBaseValidator)


指定した値と比較値の比較関係を示す値を取得または設定します。
構文
'Declaration
 
Public Property ComparedOperator As ValidateComparisonOperator
'使用法
 
Dim instance As CompareValueBaseValidator
Dim value As ValidateComparisonOperator
 
instance.ComparedOperator = value
 
value = instance.ComparedOperator
public ValidateComparisonOperator ComparedOperator {get; set;}

プロパティ値

ValidateComparisonOperator 値。 デフォルト値は ValidateComparisonOperator.GreaterThan>です。
セル(1,1)に値を入力して検証を確認してください。
//Type a value equal to or less than 10 to see the red line
FarPoint.Win.Spread.LineNotify linen = new FarPoint.Win.Spread.LineNotify();
linen.LineColor = Color.Red;
linen.DoActionReason = FarPoint.Win.Spread.ValidateReasons.EndEdit;
FarPoint.Win.Spread.CompareCellValidator compare = new FarPoint.Win.Spread.CompareCellValidator();
compare.ComparedOperator = FarPoint.Win.Spread.ValidateComparisonOperator.GreaterThan;
compare.Row = 0;
compare.Column = 0;
compare.Actions.Add(linen);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare);
fpSpread1.Sheets[0].Cells[0, 0].Value = 10;
'Type a value equal to Or less than 10 to see the red line
Dim linen As New FarPoint.Win.Spread.LineNotify()
linen.LineColor = Color.Red
linen.DoActionReason = FarPoint.Win.Spread.ValidateReasons.EndEdit
Dim compare As New FarPoint.Win.Spread.CompareCellValidator()
compare.ComparedOperator = FarPoint.Win.Spread.ValidateComparisonOperator.GreaterThan
compare.Row = 0
compare.Column = 0
compare.Actions.Add(linen)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), compare)
FpSpread1.Sheets(0).Cells(0, 0).Value = 10
参照

CompareValueBaseValidator クラス
CompareValueBaseValidator メンバ

 

 


Copyright © 2004 GrapeCity inc.