Spread.Sheets
value1 メソッド
データ検証の最初の値を取得します。
シンタックス
Javascript (Usage) 
var instance = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(condition);
var value; // Type: object
value = instance.value1(baseRow, baseColumn);
Javascript (Specification) 
function value1( 
   baseRow : number,
   baseColumn : number
) : object;

パラメータ

baseRow
baseColumn

戻り値の型

最初の値。
使用例
次のサンプルコードは、セルの値を検証します。
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.cellValueCondition);
nCondition.compareType(GC.Spread.Sheets.ConditionalFormatting.GeneralComparisonOperators.equalsTo);
nCondition.expected(0);
//When the option is false, the validation fails and the red alert is displayed.
//When the option is true, the blank cell is treated as zero and the validation is successful.
nCondition.treatNullValueAsZero(false);
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
validator.ignoreBlank(false);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, null);
alert(validator.value1());

関連トピック

参照

DefaultDataValidator タイプ

 

 


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