SpreadJS Documentation
CellValueCondition Constructor
Indicates the compare type.
Indicates the expected value.
Indicates the formula that specifies a cell.
Represents a cell value condition with a specified compare type, expected value, and formula.
Syntax
var instance = new GcSpread.Sheets.CellValueCondition(compareType, expected, formula);
function CellValueCondition( 
   compareType : GeneralCompareType,
   expected : object,
   formula : string
) : CellValueCondition;

Parameters

compareType
Indicates the compare type.
expected
Indicates the expected value.
formula
Indicates the formula that specifies a cell.
Example
This example creates a cell value condition.
var nCondition = new GcSpread.Sheets.CellValueCondition(GcSpread.Sheets.GeneralCompareType.GreaterThan, 4, "$A$1");
var validator = new GcSpread.Sheets.DefaultDataValidator(nCondition)
activeSheet.getCell(0, 0, GcSpread.Sheets.SheetArea.viewport).dataValidator(validator);
spread.highlightInvalidData(true);
activeSheet.setValue(0, 0, -1);
See Also

Reference

CellValueCondition type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.