SpreadJS Documentation
CellValueRule Constructor
The comparison operator for the rule.
The value of the first object.
The value of the second object.
The style for the rule.
Represents a cell value conditional rule.
Syntax
var instance = new GcSpread.Sheets.CellValueRule(operator, value1, value2, style);
function CellValueRule( 
   operator : ComparisonOperator,
   value1 : object,
   value2 : object,
   style : Style
) : CellValueRule;

Parameters

operator
The comparison operator for the rule.
value1
The value of the first object.
value2
The value of the second object.
style
The style for the rule.
Example
This example creates a cell value rule.
<input type="button" id="button1" value="button1"/>

activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]);
var cell = new GcSpread.Sheets.CellValueRule();
cell.operator = 2;
cell.value1 = 5;
cell.ranges = [new GcSpread.Sheets.Range(0, 0, 10, 1)];
cell.style = new GcSpread.Sheets.Style();
cell.style.backColor = "red";
cell.style.foreColor = "black";
activeSheet.getConditionalFormats().addRule(cell);

$("#button1").click(function () {
cell.reset();
activeSheet.isPaintSuspended(true);
activeSheet.isPaintSuspended(false);
    });
See Also

Reference

CellValueRule class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.