SpreadJS Documentation
ButtonCellType Constructor
Represents a button cell.
Syntax
var instance = new GcSpread.Sheets.ButtonCellType();
function ButtonCellType() : ButtonCellType;
Example
This example creates a button cell.
var cellType = new GcSpread.Sheets.ButtonCellType(); 
cellType.buttonBackColor("#FFFF00"); 
cellType.text("this is a button"); 
activeSheet.setCellType(1,1,cellType);

spread.bind(GcSpread.Sheets.Events.ButtonClicked, function (e, args) {
    var sheet = args.sheet, row = args.row, col = args.col;
    var cellType = activeSheet.getCellType(row, col);
    if (cellType instanceof GcSpread.Sheets.ButtonCellType) {
        alert("Button Clicked");
    }
});
See Also

Reference

ButtonCellType class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.