[]
Sheets.CellState.CellStateManager
• new CellStateManager(sheet
)
Represents a cellstate manager that can manage all cell state in a sheet.
Name | Type | Description |
---|---|---|
sheet |
Worksheet |
The worksheet. |
▸ add(range
, state
, style
, sheetArea?
): void
description
Add cell state instance for range , which will apply style of cellState when the state of range cell matched.
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);
Name | Type | Description |
---|---|---|
range |
Range |
The scope range which will apply style of cellState. |
state |
CellStatesType |
Which state will use style. |
style |
Style |
Which style when the state is matched. |
sheetArea? |
SheetArea |
The sheet area. If this parameter is not provided, it defaults to viewport . |
void
▸ clear(range
, sheetArea
): void
description
Clear all style by range, after clear there are no style will be applied when the cell state is matched.
example
var range = new GC.Spread.Sheets.Range(1,2,3,3);
sheet.cellStates.clear(range, GC.Spread.Sheets.SheetArea.viewport);
Name | Type | Description |
---|---|---|
range |
Range |
The scope range for clear. |
sheetArea |
SheetArea |
The sheet area. If this parameter is not provided, it defaults to viewport . |
void