SpreadJS 13
GC.Spread.Sheets.CellState Namespace / CellStateManager type / add Method
{GC.Spread.Sheets.Range} The scope range which will apply style of cellState.
{GC.Spread.Sheets.CellStatesType} Which state will use style.
{GC.Spread.Sheets.Style} Which style when the state is matched.
{GC.Spread.Sheets.SheetArea} The sheet area. If this parameter is not provided, it defaults to viewport.
In This Topic
    add Method
    In This Topic
    Syntax
    var instance = new GC.Spread.Sheets.CellState.CellStateManager(sheet);
    var value; // Type: any
    value = instance.add(range, state, style, sheetArea);
    function add( 
       range : any,
       state : any,
       style : any,
       sheetArea : any
    ) : any;

    Parameters

    range
    {GC.Spread.Sheets.Range} The scope range which will apply style of cellState.
    state
    {GC.Spread.Sheets.CellStatesType} Which state will use style.
    style
    {GC.Spread.Sheets.Style} Which style when the state is matched.
    sheetArea
    {GC.Spread.Sheets.SheetArea} The sheet area. If this parameter is not provided, it defaults to viewport.
    Example
    var style = new  GC.Spread.Sheets.Style();
    style.backColor = 'blue';
    style.foreColor = 'red';
    var range = new GC.Spread.Sheets.Range(1,2,3,3);
    sheet.cellStates.add(range,GC.Spread.Sheets.CellStatesType.hover,style,101);
    See Also