GcSpread.Sheets Namespace > Events type : ButtonClicked Event |
var instance; // Type: Events instance.ButtonClicked = function(sheet, sheetName, row, col, sheetArea) { };
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"); } });