通过绑定cellclick事件,在事件中添加批注并显示
sheet.bind(GC.Spread.Sheets.Events.CellClick, function (sender, args) {
var row = args.row;
var col = args.col;
var comment = new GC.Spread.Sheets.Comments.Comment();
comment.text("new comment!");
comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
sheet.getCell(row,col).comment(comment);
}); |