SpreadJS Documentation
backColor Field
Indicates the background color.
Syntax
var instance = new GcSpread.Sheets.TableStyleInfo(backColor,
                                                 foreColor,
                                                 font,
                                                 borderLeft,
                                                 borderTop,
                                                 borderRight,
                                                 borderBottom,
                                                 borderHorizontal,
                                                 borderVertical,
                                                 textDecoration);
var value; // Type: string
value = instance.backColor;
var backColor : string;
Example
This example creates a table.
var tableStyle = new GcSpread.Sheets.TableStyle();
var thinBorder = new GcSpread.Sheets.LineBorder("black", GcSpread.Sheets.LineStyle.dotted);
tableStyle.wholeTableStyle(new GcSpread.Sheets.TableStyleInfo("aliceblue", "green", "bold 10pt arial", thinBorder, thinBorder, thinBorder, thinBorder, thinBorder, thinBorder));

var tStyleInfo = new GcSpread.Sheets.TableStyleInfo();
tStyleInfo.backColor = "green";
tStyleInfo.foreColor = "red";
tStyleInfo.borderBottom = new GcSpread.Sheets.LineBorder("green", GcSpread.Sheets.LineStyle.thin);
tStyleInfo.borderLeft = new GcSpread.Sheets.LineBorder("yellow", GcSpread.Sheets.LineStyle.medium);
tStyleInfo.borderTop = new GcSpread.Sheets.LineBorder("green", GcSpread.Sheets.LineStyle.thin);
tStyleInfo.borderRight = new GcSpread.Sheets.LineBorder("green", GcSpread.Sheets.LineStyle.thin);
tStyleInfo.font = "bold 11pt arial";

tableStyle.headerRowStyle(tStyleInfo);
var table = activeSheet.addTable("table1", 1, 1, 5, 5, tableStyle);
See Also

Reference

TableStyleInfo type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.