GC.Spread.Sheets.ConditionalFormatting Namespace > NormalConditionRule class : NormalConditionRule Constructor |
var instance = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(ruleType, ranges, style, operator, value1, value2, text, formula, type, rank);
var style = new GC.Spread.Sheets.Style(); style.backColor = "red"; var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)]; activeSheet.conditionalFormats.addSpecificTextRule(GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators.contains, "test", style, ranges); activeSheet.setValue(0, 0, "testing"); activeSheet.setValue(1, 0, "test"); activeSheet.setValue(2, 0, "a"); activeSheet.setValue(3, 0, "t");
<input type="button" id="button1" value="button1"/> activeSheet.setArray(0,0,[1,2,3,4,5,6,7,8,9,10]); var cell = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(); cell.ruleType(GC.Spread.Sheets.ConditionalFormatting.RuleType.cellValueRule); cell.operator(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.greaterThan); cell.value1(5); cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]); var style = new GC.Spread.Sheets.Style(); style.backColor = "red"; cell.style(style); activeSheet.conditionalFormats.addRule(cell); $("#button1").click(function () { cell.reset(); activeSheet.suspendPaint(); activeSheet.resumePaint(); });
var style = new GC.Spread.Sheets.Style(); style.backColor = "green"; var ranges = [new GC.Spread.Sheets.Range(0, 0, 10, 1)]; activeSheet.conditionalFormats.addUniqueRule(style, ranges); activeSheet.setValue(0, 0, 50); activeSheet.setValue(1, 0, 50); activeSheet.setValue(2, 0, 11); activeSheet.setValue(3, 0, 5);