SpreadJS Documentation
ComparisonOperator Enumeration
Specifies the comparison operator.
Members
MemberDescription
BetweenDetermines whether a cell value is between the two parameter values.
EqualsToDetermines whether a cell value is equal to the parameter value.
GreaterThanDetermines whether a cell value is greater than the parameter value.
GreaterThanOrEqualsToDetermines whether a cell value is greater than or equal to the parameter value.
LessThanDetermines whether a cell value is less than the parameter value.
LessThanOrEqualsToDetermines whether a cell value is less than or equal to the parameter value.
NotBetweenDetermines whether a cell value is not between the two parameter values.
NotEqualsToDetermines whether a cell value is not equal to the parameter value.
Example
This example creates a validator.
spread.highlightInvalidData(true);
var dv = GcSpread.Sheets.DefaultDataValidator.createDateValidator(GcSpread.Sheets.ComparisonOperator.Between, new Date(2012, 11, 31), new Date(2013, 11, 31));
dv.showInputMessage = true;
dv.inputMessage = "Enter a date between 12/31/2012 and 12/31/2013.";
dv.inputTitle = "Tip";
activeSheet.getRow(1).dataValidator(dv);
This example creates a rule.
var style = new GcSpread.Sheets.Style();
style.backColor = "red";
var rule = new GcSpread.Sheets.CellValueRule(GcSpread.Sheets.ComparisonOperator.Between,2,100,style);
rule.ranges=[new GcSpread.Sheets.Range(0,0,5,1)];
sheet.getConditionalFormats().addRule(rule);
sheet.setValue(0,0,1,3);
sheet.setValue(1,0,45,3);
Inheritance Hierarchy

Object
   GcSpread.Sheets.ComparisonOperator

See Also

Reference

GcSpread.Sheets Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.