Pop Up modal should open on button click event inside cell

Posted by: srinivasan.lakshmanan on 17 July 2018, 2:23 am EST

    • Post Options:
    • Link

    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

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels