This is a migrated thread and some comments may be shown as answers.

ConnectionTool Undo/Redo

3 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Roni
Top achievements
Rank 1
Roni asked on 18 Aug 2014, 06:41 PM
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!

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 20 Aug 2014, 07:57 AM
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.
 
0
naga
Top achievements
Rank 1
answered on 07 Apr 2016, 04:36 AM

hi  Petar Mladenov ,

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

 

0
Petar Mladenov
Telerik team
answered on 07 Apr 2016, 09:15 AM
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.
Tags
General Discussions
Asked by
Roni
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
naga
Top achievements
Rank 1
Share this question
or