MESCIUS SPREAD for Windows Forms 17.0J
Candidates プロパティ (IncludeListValidator)

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

プロパティ値

候補文字列を示すSystem.Stringの配列。デフォルト値はnull 参照 (Visual Basicでは Nothing)です。
次のサンプルコードは、無効な項目のリストを持つバリデーターを作成します。
//Type an item in cell 1,1 that is not in the list to see the error notification
FarPoint.Win.Spread.CellStyleNotify cnotify = new FarPoint.Win.Spread.CellStyleNotify();
cnotify.InvalidCellStyle.BackColor = Color.Yellow;
FarPoint.Win.Spread.IncludeListValidator ilist = new FarPoint.Win.Spread.IncludeListValidator();
ilist.Candidates = new string[] { "Bird", "Deer", "Squirrel", "Lizard" };           
ilist.Actions.Add(cnotify);
fpSpread1.Sheets[0].AddValidators(new FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), ilist);
'Type an item in cell 1,1 that is not in the list to see the error notification
Dim cnotify As New FarPoint.Win.Spread.CellStyleNotify()
cnotify.InvalidCellStyle.BackColor = Color.Yellow
Dim IList As New FarPoint.Win.Spread.IncludeListValidator()
IList.Candidates = New String() {"Bird", "Deer", "Squirrel", "Lizard"}
IList.Actions.Add(cnotify)
FpSpread1.Sheets(0).AddValidators(New FarPoint.Win.Spread.Model.CellRange(1, 1, 1, 1), IList)
参照

IncludeListValidator クラス
IncludeListValidator メンバ
5cea34fc-7ab0-49d0-940c-ef1dad354b32

 

 


© MESCIUS inc. All rights reserved.