SpreadJS Documentation
Setting Cell Borders

You can specify borders for a cell.

Using Code

The following example sets a border for a cell.

JavaScript
Copy Code
$(document).ready(function () {
    var spread = new GcSpread.Sheets.Spread($("#ss").get(0),{sheetCount:3});
    var activeSheet = spread.getActiveSheet();

    //Set border lines to cell(1,1).
    var cell = activeSheet.getCell(1, 1, GcSpread.Sheets.SheetArea.viewport);
    cell.borderLeft(new GcSpread.Sheets.LineBorder("Red", GcSpread.Sheets.LineStyle.thick));
    cell.borderTop(new GcSpread.Sheets.LineBorder("Blue", GcSpread.Sheets.LineStyle.double));
    cell.borderRight(new GcSpread.Sheets.LineBorder("Green", GcSpread.Sheets.LineStyle.dashDot));
    cell.borderBottom(new GcSpread.Sheets.LineBorder("Yellow", GcSpread.Sheets.LineStyle.mediumDashed));

});
See Also

Developer's Guide

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.