Spread.Sheets
validator フィールド
データバリデーターを示します。
シンタックス
Javascript (Usage) 
var instance = new GC.Spread.Sheets.Style(backColor,
                                         foreColor,
                                         hAlign,
                                         vAlign,
                                         font,
                                         themeFont,
                                         formatter,
                                         borderLeft,
                                         borderTop,
                                         borderRight,
                                         borderBottom,
                                         locked,
                                         textIndent,
                                         wordWrap,
                                         shrinkToFit,
                                         backgroundImage,
                                         cellType,
                                         backgroundImageLayout,
                                         tabStop,
                                         textDecoration,
                                         imeMode,
                                         name,
                                         parentName,
                                         watermark,
                                         cellPadding,
                                         labelOptions);
var value; // Type: DefaultDataValidator
value = instance.validator;
Javascript (Specification) 
var validator : DefaultDataValidator;
使用例
次のサンプルコードは、validatorプロパティを使用します。
spread.options.highlightInvalidData = true;
var dv = GC.Spread.Sheets.DataValidation.createDateValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, new Date(2012, 11, 31), new Date(2013, 11, 31));
dv.showInputMessage(true);
dv.inputMessage("Enter a date between 12/31/2012 and 12/31/2013.");
dv.inputTitle("Tip");
var style = new GC.Spread.Sheets.Style();
style.validator = dv;
activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);

関連トピック

参照

Style クラス

 

 


© 2016-2017, GrapeCity inc. All rights reserved.