ConnectionTool Undo/Redo

4 posts, 0 answers
  1. Roni
    Roni avatar
    6 posts
    Member since:
    Jun 2014

    Posted 18 Aug 2014 Link to this post

    Hello,

    Is there a way to override the MouseDown for the ConnectionTool so it doesn't add the action to the UndoRedoService?  I would like to connection created by the ConnectionTool removed or not in the UndoStack.

    Thanks!
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 20 Aug 2014 Link to this post

    Hi Roni,

    You can consider subscribing for Diagram.CommandExecuted event and remove the "Add Connection" Command from the UndoStack. Please let us know if this fits well in your scenario. Below you can find a sample code:
    private void diagram_CommandExecuted(object sender, CommandRoutedEventArgs e)
         {
             if (e.Command.Name == "Add Connection")
             {
                 this.diagram.UndoRedoService.RemoveCommand(this.diagram.UndoRedoService.UndoStack.FirstOrDefault());
             }
         }


    Regards,
    Petar Mladenov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. naga
    naga avatar
    8 posts
    Member since:
    Apr 2016

    Posted 06 Apr in reply to Petar Mladenov Link to this post

    hi  Petar Mladenov ,

      I need to stop undo and redo service (for prevent shapes and connections ) in kendo diagram using jquery or javascript  .

     

  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 07 Apr Link to this post

    Hello Naga,

    Please open a new support ticket with product Kendo UI or ask in the KendoUI forums. This way we will be better able to address your questions.

    Regards,
    Petar Mladenov
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top