SpreadJS Documentation
getRules Method
The row index.
The column index.
Gets the conditional rules from the cell at the specified row and column.
Syntax
var instance = new GcSpread.Sheets.ConditionalFormats(worksheet);
var value; // Type: Array
value = instance.getRules(row, column);
function getRules( 
   row : number,
   column : number
) : Array;

Parameters

row
The row index.
column
The column index.

Return Value

The conditional rules.
Example
This example uses the getRules method.
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)];
activeSheet.getConditionalFormats().addRule(rule);
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,45,3);
var ruletest = activeSheet.getConditionalFormats().getRules();
alert(ruletest[0].style.backColor);
Remarks
If all parameters are omitted, returns all conditional rules.
See Also

Reference

ConditionalFormats type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.