Handle comments via GC.Spread.Commands.CommandManager

Posted by: rlescano on 28 September 2017, 10:24 am EST

  • Posted 28 September 2017, 10:24 am EST

    Hello, I’m currently using CommandManager to handle all kind of actions over SpreadJS component such as add columns/rows, delete columns/rows, cell bordering, etc.

    I already have Insert and Delete Comments implemented via Commands but I couldn’t find the way to Update Comments via CommandManager.

    I’m currently doing it like this:

    this.spreadsheet.bind(GC.Spread.Sheets.Events.CommentChanged, (type, sheet) => {

    const comment = sheet.comment.toJSON();

    if (sheet.propertyName === ‘text’) {

    // do so auditing…

    }

    });

    …but I want to change this so I can use CommandManager and support Undo Actions.

    Is there a way to perform Update of Comments through a Command registered in CommandManager?

    Regards

    Román

  • Posted 6 October 2017, 12:07 pm EST

    Hi Roman,

    You can use the code given here to create a custom undo action for Comment change:

    http://help.grapecity.com/spread/SpreadSheets10/webframe.html#JavascriptLibrary~GC.Spread.Commands.CommandManager~register.html

    Let me know if you face any issues while doing so.

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels