Missing delete event listener

Posted by: davide.vago on 26 March 2020, 5:06 am EST

  • Posted 26 March 2020, 5:06 am EST

    Good morning/afternoon

    I'm currently trying to track whenever a user press the return key of the keyboard to delete a cell content but I can't find anything useful.

    I've been looking at this as well: https://www.grapecity.com/spreadjs/demos/features/workbook/spread-events/purejs

    Would you mind help me to find out a solution?
    Thanks in advance.
  • Marked as Answer

    Replied 26 March 2020, 3:52 pm EST

    Hi Davide,

    I'm little confused here, return key is not used to delete the cell contents, were you referring to the 'backspace' or 'delete' key?
    For 'backspace' key, it simply puts the cell in edit mode, so you could just handle the 'EditEnded' event and check if the cell contents are cleared.
    For 'delete' key, you may handle the 'RangeChanged' event and check if the action type is of GC.Spread.Sheets.RangeChangedAction.clear.

    Please let me know if this doesn't resolve your issue.

  • Replied 2 July 2020, 4:09 am EST

    Apologies for the delay, thanks for your support.

    The solution of using RangeChanged worked fine, I would suggest to improve this documentation page: https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.RangeChangedAction.html as the RangeChanged event does return info.action as number however there is no reference of what these numbers are referring to.

    I had to suppose that info.action: 2 means "clear"

    Thanks again
  • Replied 2 July 2020, 8:08 pm EST

    Thank you for the suggestion. I've forwarded it to the concerned team and will keep you posted with updates regarding the same. The internal tracking Id for the case is SJS-4878.
Need extra support?

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

Learn More

Forum Channels