SpreadJS Documentation
ComparisonOperators Enumeration
GC.Spread.Sheets.ConditionalFormatting Namespace : ComparisonOperators 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.options.highlightInvalidData = true;
var dv = GC.Spread.Sheets.DataValidation.createDateValidator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.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.getCell(1, -1).validator(dv);
This example creates a rule.
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
var ranges=[new GC.Spread.Sheets.Range(0,0,5,1)];
activeSheet.conditionalFormats.addCellValueRule(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, 2, 100, style, ranges);
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,45,3); 
Inheritance Hierarchy

Object
   GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators

See Also

Reference

GC.Spread.Sheets.ConditionalFormatting Namespace