SpreadJS Documentation > Sample Code > Sample Code for Rows and Columns > Setting the Header Color |
You can change the forecolor and backcolor of the header.
This example sets the backcolor and forecolor for the header.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3}); var sheet = spread.getActiveSheet(); //Set the backcolor and forecolor for the entire column header. var row = sheet.getRow(0, GcSpread.Sheets.SheetArea.colHeader); row.backColor("Red"); row.foreColor("White"); //Set the backcolor of second row header. sheet.getCell(1, 0, GcSpread.Sheets.SheetArea.rowHeader).backColor("Yellow"); }); |