SpreadJS Documentation
reset Method
Resets the rule.
Syntax
var instance = new GcSpread.Sheets.FormulaRule(formula, style);
var value; // Type: any
value = instance.reset();
function reset() : any;
Example
This example uses the reset method.
<input type="button" id="button1" value="button1"/>

var style = new GcSpread.Sheets.Style();
style.backColor = "red";
var rule =new GcSpread.Sheets.FormulaRule("=A1=B1+C1", style);
rule.ranges = [new GcSpread.Sheets.Range(0, 0, 5, 1) ];
activeSheet.getConditionalFormats().addRule(rule);
activeSheet.setValue(0, 0, 2,3);
activeSheet.setValue(0, 1, 1,3);
activeSheet.setValue(0, 2,1,3);
activeSheet.setValue(1, 0, 1,3);

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

Reference

FormulaRule class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.