您可以绑定cellclick事件,在触发事件中可以获取到点击单元格的类型并判断如果是GC.Spread.Sheets.CellTypes.Button类型再执行您需要的逻辑即可。像这样:
spread.bind(GC.Spread.Sheets.Events.ButtonClicked,
function(e, args) {
var sheet = args.sheet,
row = args.row,
col = args.col;
var cellType = sheet.getCellType(row, col);
if (cellType instanceof GC.Spread.Sheets.CellTypes.Button) {
// do something
}
|