Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Node Deleting and Link Deleting Events (Read 1410 times)
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Node Deleting and Link Deleting Events
Dec 14th, 2009 at 1:08pm
Print Post  
Hi Stoyo

For some requirement I extended the Diagram Control and attaching popup menu with the links created. The popup menu is handled within the newly derived class.

One of the menu item removes the link by invoking the this.Links.Remove(link)

Now, whether the link should be removed or not is checked by my control which contains the derived diagram control.

Here my requirement is I need events which can cancle the delete action based on validation.

How I can achive this or when we have events like OnLinkDeleting/OnNodeDeleting or OnLinkBeforeDeleting/OnNodeBeforeDeleting ?

-Regards
Rajesh

  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Node Deleting and Link Deleting Events
Reply #1 - Dec 14th, 2009 at 2:08pm
Print Post  
Hi Rajesh,

Links.Remove calls the protected Diagram.RemoveItem method to remove the link. You could override RemoveItem and raise validation events from it. To cancel the action, simply don't call the base RemoveItem implementation.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint