var instance = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(condition); var value; // Type: any value = instance.reset();
function reset() : any;
var instance = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(condition); var value; // Type: any value = instance.reset();
function reset() : any;
// 次のサンプルコードは、resetメソッドを使用します。 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); // 次のオプションがfalseの場合、検証は失敗し、赤のアラートが表示されます。// 次のオプションがtrueの場合、空白セルはゼロとして扱われ、検証は成功します。 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); validator.reset();
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); validator.reset();