SpreadJS Documentation
FormulaCondition Constructor
The type of the custom value.
The formula string or expression.
Represents a custom condition with a specified formula or expression.
Syntax
var instance = new GcSpread.Sheets.FormulaCondition(customValueType, formula);
function FormulaCondition( 
   customValueType : CustomValueType,
   formula : string
) : FormulaCondition;

Parameters

customValueType
The type of the custom value.
formula
The formula string or expression.
Example
This example validates cell data.
var nCondition = new GcSpread.Sheets.FormulaCondition(GcSpread.Sheets.CustomValueType.Formula, "A1>0");
var validator = new GcSpread.Sheets.DefaultDataValidator(nCondition)
activeSheet.getCell(0, 0, GcSpread.Sheets.SheetArea.viewport).dataValidator(validator);
spread.highlightInvalidData(true);
activeSheet.setValue(0, 0, -4);
See Also

Reference

FormulaCondition type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.