SpreadJS Documentation
GC.Spread.Sheets.ConditionalFormatting Namespace / NormalConditionRule class / value2 Method
The first value or the base row.
The base column.
In This Topic
    value2 Method
    In This Topic
    Gets or sets the first value.
    Syntax
    var instance = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(ruleType, ranges, style, operator, value1, value2, text, formula, type, rank);
    var value; // Type: any
    value = instance.value2(valueOrBaseRow, baseColumn);
    function value2( 
       valueOrBaseRow : undefined,
       baseColumn : number
    ) : any;

    Parameters

    valueOrBaseRow
    The first value or the base row.
    baseColumn
    The base column.

    Return Value

    If no value is set or baseRow and baseColumn is set, returns the first value; otherwise, returns the number condition rule.
    Example
    This example uses the value2 method.
    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.between);
    cell.value1(5);
    cell.value2(7);
    cell.ranges([new GC.Spread.Sheets.Range(0, 0, 10, 1)]);
    var style = new GC.Spread.Sheets.Style();
    style.backColor = "red";
    style.foreColor = "black";
    cell.style(style);
    activeSheet.conditionalFormats.addRule(cell);
    See Also