Posted 17 July 2018, 2:23 am EST
HI,
As per my requirement,A cell must have a button named Comment and when clicked on it Popup should open.
Forums Home / Spread / SpreadJS
Posted by: srinivasan.lakshmanan on 17 July 2018, 2:23 am EST
Posted 17 July 2018, 2:23 am EST
HI,
As per my requirement,A cell must have a button named Comment and when clicked on it Popup should open.
Posted 17 July 2018, 11:59 pm EST
Hello,
You can create a button cellltype and handle it’s click event to show the pop up:
var cellType = new GC.Spread.Sheets.CellTypes.Button();
cellType.buttonBackColor("#FFFF00");
cellType.text("this is a button");
activeSheet.setCellType(1,1,cellType);
spread.bind(GC.Spread.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 GC.Spread.Sheets.CellTypes.Button) {
alert("Button Clicked");
}
});
Thanks,
Deepak Sharma
Posted 18 July 2018, 6:08 am EST
Thank you Deepak…It’s Working