GC.Spread.Sheets.CellTypes.ComboBox onchange event

Posted by: datta on 27 April 2020, 7:58 am EST

    • Post Options:
    • Link

    Posted 27 April 2020, 7:58 am EST

    Hi ,

    How can I capture value change event on GC.Spread.Sheets.CellTypes.ComboBox() when user selects an option ? Is it possible to capture value change event?

  • Posted 28 April 2020, 10:19 am EST

    Hi,

    You may handle the cell changed event to detect when a cell value changes. Please refer to the following code snippet and sample demonstrating the same:

    spread.bind(GC.Spread.Sheets.Events.CellChanged, (e, args) => {
      if (args.propertyName === "value") {
        var cellType = args.sheet.getCellType(args.row, args.col);
        if (
          !cellType ||
          !(cellType instanceof GC.Spread.Sheets.CellTypes.ComboBox)
        ) {
          return;
        }
        // args.row === 1 && args.col === 3;
        alert("Changed Text   " + args.newValue);
      }
    });
    

    https://codesandbox.io/s/spread-js-starter-v16wv?file=/src/index.js:163-544

    Regards

Need extra support?

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

Learn More

Forum Channels