SpreadJS Documentation
getDefaultStyle Method
The sheet area. If this parameter is not provided, it defaults to viewport.
Gets the default style information for the sheet.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: Style
value = instance.getDefaultStyle(sheetArea);
function getDefaultStyle( 
   sheetArea : SheetArea
) : Style;

Parameters

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

Return Value

Returns the sheet's default style.
Example
This example uses the getDefaultStyle method.
var defaultStyle = new GcSpread.Sheets.Style();
defaultStyle.backColor = "LemonChiffon";
defaultStyle.foreColor = "Red";
defaultStyle.borderLeft = new GcSpread.Sheets.LineBorder("Green");
defaultStyle.borderTop = new GcSpread.Sheets.LineBorder("Green");
defaultStyle.borderRight = new GcSpread.Sheets.LineBorder("Green");
defaultStyle.borderBottom = new GcSpread.Sheets.LineBorder("Green");
activeSheet.setDefaultStyle(defaultStyle, GcSpread.Sheets.SheetArea.viewport);
var cstyle = activeSheet.getDefaultStyle(GcSpread.Sheets.SheetArea.viewport);
alert(cstyle.backColor);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.