MESCIUS SPREAD for Windows Forms 15.0J
Candidates プロパティ (ExcludeListValidator)
使用例 

指定した値がそこに含まれていないかどうかを検証するための候補文字列リストを示すSystem.Stringの配列を取得または設定します。
構文
'宣言
 
Public Property Candidates As String()
public string[] Candidates {get; set;}

プロパティ値

候補文字列を示すSystem.Stringの配列。デフォルト値はnull 参照 (Visual Basicでは Nothing)です。
使用例
次のサンプルコードは、除外リスト検証を使用します。
//Type one of the candidate items in cell 1,1 to see the error notification
FarPoint.Win.Spread.CellStyleNotify cnotify = new FarPoint.Win.Spread.CellStyleNotify();
cnotify.InvalidCellStyle.BackColor = Color.Bisque;
FarPoint.Win.Spread.ExcludeListValidator excludelist = new FarPoint.Win.Spread.ExcludeListValidator();
excludelist.Candidates = new string[] { "Bird", "Deer", "Squirrel", "Lizard" };
excludelist.Actions.Add(cnotify);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), excludelist);
'Type one of the candidate items in cell 1,1 to see the error notification
Dim cnotify As New FarPoint.Win.Spread.CellStyleNotify()
cnotify.InvalidCellStyle.BackColor = Color.Bisque
Dim excludelist As New FarPoint.Win.Spread.ExcludeListValidator()
excludelist.Candidates = New String() {"Bird", "Deer", "Squirrel", "Lizard"}
excludelist.Actions.Add(cnotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), excludelist)
参照

ExcludeListValidator クラス
ExcludeListValidator メンバ

 

 


© MESCIUS inc. All rights reserved.