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. Image for the cookie policy date

Getting Error while Linking two symbols

Hi I am getting error while linking two symbols at runtime onlyif i have a code in diagram_ChildrenChangeComplete E.g protected Link CreateLink(PointF[] pts) { Link link = new Link(Link.Shapes.Line, pts); link.EndPoints.LastEndPointDecorator = new EndPointDecorator(EndPointVisuals.ClosedArrow); return link; } private void diagram_ChildrenChangeComplete(object sender, Syncfusion.Windows.Forms.Diagram.NodeCollectionEventArgs evtArgs) { string symbolFullName = evtArgs.Node.Name ; MessageBox.Show (symbolFullName); } i am getting following error "An unhandled exception of type ''System.ArgumentOutOfRangeException'' occurred in syncfusion.diagram.base.dll Additional information: Index and length must refer to a location within the string." if i remove this event diagram_ChildrenChangeComplete its working fine plz help me Regards Rajkumar

1 Reply

AD Administrator Syncfusion Team December 21, 2005 07:29 PM UTC

Hi Rajkumar, You might want to make sure that the ChildrenChangeComplete event''s NodeCollectionEventArgs.Node parameter is valid, and has a non-Null Name value. Restricting the handler for node additions by examining the value of the NodeCollectionEventArgs.ChangeType param will help avoid such exceptions. The following code should give you an idea, private void diagramComponent_ChildrenChangeComplete(object sender, Syncfusion.Windows.Forms.Diagram.NodeCollectionEventArgs evtArgs) { if(evtArgs.ChangeType == CollectionExChangeType.Insert) { foreach(INode node in evtArgs.Nodes) Trace.WriteLine(node.Name); } } Prakash Surendra Syncfusion Inc.,

Loader.
Live Chat Icon For mobile
Up arrow icon