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

Nodes and connected connector lines

Thread ID:





74301 Jun 6,2008 08:49 AM UTC Jun 6,2008 09:40 AM UTC WinForms 1
Tags: Diagram
Yener Alemdaroglu
Asked On June 6, 2008 08:49 AM UTC


When deleting a node ,I want to delete the connector lines attached to that node. How can I do that?


J.Nagarajan [Syncfusion]
Replied On June 6, 2008 09:40 AM UTC

Hi Yener ,

Thank you for your interest in Syncfusion Products.

If your intention is to remove the Connector when you delete a connected node then you have to handle NodeCollectionChanged event. Please refer to the following code snippet.

void EventSink_NodeCollectionChanged(CollectionExEventArgs evtArgs)
LineConnector line; Node tonode, fromNode;
Node m_node = evtArgs.Element as Node;

if (m_node is Node)

if (evtArgs.ChangeType == CollectionExChangeType.Remove)
IEnumerator enumnodes = this.myDiagram1.Model.Nodes.GetEnumerator();
NodeCollection links = new NodeCollection();

while (enumnodes.MoveNext())
Node node = enumnodes.Current as Node;
//Determine if the node is of type Link
if (node.GetType() == typeof(Syncfusion.Windows.Forms.Diagram.PolyLineConnector))
line = node as PolyLineConnector;
tonode = line.ToNode as Node;
fromNode = line.FromNode as Node;
if (tonode == null || fromNode == null)




Please refer the below sample in the following link:


Please let me know if any concerns.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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