Undo

Posted by: Hoang.Nguyen on 19 September 2017, 10:13 am EST

  • Posted 19 September 2017, 10:13 am EST

    How do I implement Undo (ctrl + z) to flexgrid? Thank you very much.
  • Replied 21 September 2017, 12:54 am EST

    Hi Hoang,
    This feature is not supported in FlexGrid. This feature can be used in FlexSheet.

    However, if you would like to use this feature, you need to handle cellEditEnded and pastingCell event to get the changes and store in an array. And make the changes back on Ctrl+z key combination press by handling the keydown event.


    Thanks,
    Manish Kumar Gupta
  • Replied 21 September 2017, 9:39 am EST

    Thank you sir.
  • Replied 21 September 2017, 9:55 am EST

    By the way, where can I find documentation on keydown event sir? I am looking in here but cannot find it:

    http://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.grid.FlexGrid.Class.html
  • Replied 22 September 2017, 10:34 am EST

    Hi Hoang,
    Please use the following code snippet for the same:

    this.flex.hostElement.addEventListener("keydown",(e)=>{
    alert("key down");
    });


    Thanks,
    Manish Kumar Gupta
  • Replied 5 October 2017, 9:42 am EST

    Hi,

    Is there a chance that this will be implemented for FlexGrid in the following releases ?

    That's a great functionality, but converting the FlexGrids of an entire app to FlexSheets would be painful, especially for something that would make sens to have everywhere.

    If I'm not wrong, your PureJS sample work with flexgrid (because it's form based), so it doesn't seems unfeasible :)
    http://demos.wijmo.com/5/PureJS/UndoStack/UndoStack/

    Thanks a lot for your answer.
  • Replied 10 October 2017, 12:42 am EST

    Hi,
    Please refer to the Blog from Bernardo on undo stack functionality that depicts why this could not be implemented in FlexGrid. There is some possibility to release FlexGrid with this functionality with a different module.
    https://www.grapecity.com/en/blogs/easy-undo-redo-for-html-forms

    ~Manish Kr Gupta
Need extra support?

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

Learn More

Forum Channels