We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Connector Disconnects from node

Thread ID:

Created:

Updated:

Platform:

Replies:

101125 Sep 27,2011 07:41 PM UTC Sep 29,2011 01:55 PM UTC WinForms 4
loading
Tags: Diagram
John Guarino
Asked On September 27, 2011 07:41 PM UTC

Is there an event that is fired when a connection between a connector and a node is made or broken?


Amsath Ali M [Syncfusion]
Replied On September 28, 2011 04:34 AM UTC

Hi John,

Thanks for your interest in Syncfusion products.

We suggest you to use the Diagarm.Model.EventSink’s “ConnectionChanged/Changing” event to detect whether a connection between the nodes is made or broken. Please refer the below code to achieve your requirement.

Here is the code:
[C#]
//ConnectionChanged event
diagram1.Model.EventSink.ConnectionsChanged += new CollectionExEventHandler(EventSink_ConnectionsChanged);
void EventSink_ConnectionsChanged(CollectionExEventArgs evtArgs)
{
if (evtArgs.ChangeType == CollectionExChangeType.Insert)
{
MessageBox.Show("Nodes Connected");
}
if (evtArgs.ChangeType == CollectionExChangeType.Remove)
{
MessageBox.Show("Nodes Disconnected");
}
}

For your convenience, we have created a simple sample to achieve your requirement.
Please try the below sample and let us know if you have any queries.
Forum ConnectionChnaged-2090508724.zip

Regards,
Amsath Ali. M



John Guarino
Replied On September 28, 2011 04:04 PM UTC

Thank you for the example. However, if you delete one of the rectangles, the change event does not fire. Further help is appreciated.


John Guarino
Replied On September 28, 2011 04:04 PM UTC

Thank you for the example. However, if you delete one of the rectangles, the change event does not fire. Further help is appreciated.


Amsath Ali M [Syncfusion]
Replied On September 29, 2011 01:55 PM UTC

Hi John,

Thanks for the update.

Since you have requested the same query in the Direct Trac incident 85492, we have updated the incident with necessary details. Please refer that incident for better follow up.

Please let us know if you have any queries.

Regards,
Amsath Ali. M



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;