SpreadJS Documentation
createFormulaValidator Method
The formula condition.
Creates a validator based on a formula.
Syntax
var value; // Type: DefaultDataValidator
value = GcSpread.Sheets.DefaultDataValidator.createFormulaValidator(formula);
function createFormulaValidator( 
   formula : string
) : DefaultDataValidator;

Parameters

formula
The formula condition.

Return Value

The validator.
Example
This example creates a formula validator.
spread.highlightInvalidData(true);
//The formula validator is valid if the formula condition returns true.
var dv = GcSpread.Sheets.DefaultDataValidator.createFormulaValidator("A1>0");
dv.showInputMessage = true;
dv.inputMessage = "Enter a value greater than 0 in A1.";
dv.inputTitle = "Tip";
activeSheet.setDataValidator(0, 0, dv);
See Also

Reference

DefaultDataValidator type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.