SpreadJS Documentation
getStyle Method
The row index.
The column index.
The sheet area. If this parameter is not provided, it defaults to viewport.
Gets the style information for a specified cell in the specified sheet area.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: Style
value = instance.getStyle(row, column, sheetArea);
function getStyle( 
   row : number,
   column : number,
   sheetArea : SheetArea
) : Style;

Parameters

row
The row index.
column
The column index.
sheetArea
The sheet area. If this parameter is not provided, it defaults to viewport.

Return Value

Returns the cell style of the specified cell.
Example
This example uses the getStyle method.
var style = new GcSpread.Sheets.Style();
style.backColor = "red";
style.borderLeft =new GcSpread.Sheets.LineBorder("blue");
style.borderTop = new GcSpread.Sheets.LineBorder("blue");
style.borderRight = new GcSpread.Sheets.LineBorder("blue");
style.borderBottom = new GcSpread.Sheets.LineBorder("blue");
activeSheet.setStyle(1,1,style,GcSpread.Sheets.SheetArea.viewport);
var cstyle = activeSheet.getStyle(1,1,GcSpread.Sheets.SheetArea.viewport, true);
alert(cstyle.backColor);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.