UPgrad to 8.4.0.10

We are currently upgrading from 4.1.0.62 to 8.4.0.10. I would like to determine when a link has been removed. More importantly, I need to get the nodes that were joined by the link. I was able to do this in 4.1.0.62 using code that was very similar to the example in your online documentation: http://help.syncfusion.com/ug_83/User%20Interface/Windows%20Forms/Diagram/default.htm?turl=Documents%2Fhowtodetectwhetheranewlinkhasbeenaddedremovedfromadiagram.htm

Obviously this documentation has not been updated since it still references all of the old classes. Could you please provide information on how to access the nodes when a link is removed using the newer classes. Also, it would be most helpful if you could update the documentation as well.

Thanks in advance for your help

Chris


1 Reply

PM Pandi Murugan A Syncfusion Team April 13, 2011 12:41 PM UTC

Hi Christine,

Thanks for using Syncfusion products and sorry for the inconvenience caused.

We suggest you to use EventSink's NodeCollectionChanged event to access the nodes when a link is removed. Please refer the below code snippet.

[C#]
diagram1.EventSink.NodeCollectionChanged += new Syncfusion.Windows.Forms.Diagram.CollectionExEventHandler(EventSink_NodeCollectionChanged);

void EventSink_NodeCollectionChanged(Syncfusion.Windows.Forms.Diagram.CollectionExEventArgs evtArgs)
{
if (evtArgs.ChangeType == CollectionExChangeType.Clear)
{
if (evtArgs.Elements != null)
{
foreach(Node node in evtArgs.Elements)
if (node is ConnectorBase)
{
Node fromNode = ((ConnectorBase)node).FromNode as Node;
Node toNode = ((ConnectorBase)node).ToNode as Node;
MessageBox.Show("FromNode: "+fromNode.Name + " ToNode: " + toNode.Name);
}
}
}
}

We will update our online UG as soon as possible. Please let me know if you have any concerns.

Regards,
Pandi Murugan A


Loader.
Up arrow icon