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

Parameters

formula
The formula list.

Return Value

The validator.
Example
This example creates a formula list validator.
activeSheet.setValue(0, 2, 5);
activeSheet.setValue(1, 2, 4);
activeSheet.setValue(2, 2, 5);

spread.highlightInvalidData(true);
var dv = GcSpread.Sheets.DefaultDataValidator.createFormulaListValidator("$C$1:$C$3");
dv.showInputMessage = true;
dv.inputMessage = "Pick a value from the list.";
dv.inputTitle = "tip";
activeSheet.setDataValidator(1, 1, dv);
var validList = activeSheet.getDataValidator(1, 1).getValidList(sheet, 1, 1);
See Also

Reference

DefaultDataValidator type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.