SpreadJS Documentation
Setting the Header Color

You can change the forecolor and backcolor of the header.

Using Code

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");
});
See Also

Developer's Guide

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.