Hi Stefan,
Thank you for your interest in Syncfusion Products.
To delete node with link we need to use EventSink_NodeCollectionChanged event. Please find the following code snippet that illustrates this:
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)
{
this.myDiagram1.Model.RemoveChild(line);
}
}
}
}
}
}
Please refer the below sample in the following link:
http://websamples.syncfusion.com/samples/Diagram.Windows/46162/main.htmPlease let me know if any concerns.
Regards,
Fathima