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

the order of node and connection creation


I want to add two connected connectors when I drag and drop a node from the palette.
 While it is possible to add them manually using "add" in the drop event, the problem is that the node is created after the drop event (when the connection is created), so there is no actual connection.

Is there an API or Method available to solve this?

Alternatively, are there any other events that can be used to solve this (such as "nodeCreated")?

1 Reply

SJ Sivaranjith Jeyabalan Syncfusion Team April 4, 2023 08:15 AM UTC


We have achieved your requirement using collectionChange event. When we drag and drop a node from the palette to the diagram, the collectionChange event will be triggered. In this event, we connect a node with two connectors as per your requirement. Please find the sample and code example below.

Code example:

collectionChange: (args) =>{

        if(args.state === 'Changed'){

          if(args.element.inEdges !== undefined){

            let connectors = [

















Attachment: collectionChangeaddConnector_229b3ec0.zip

Live Chat Icon For mobile
Up arrow icon