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
close icon

Get node detail one by one just after creation with label

 I want to get the node data which is current created by user using dragdrop like its (Id, Label) and if it is connected to any node using connecter then,
also it should get (Id of the connecter, Label of the connecter and, source (from node id) and destination(to node id) of the connecter).


So that I can save all its data in database and do operations (update/delete) on any node and connecter further using the saved data.

Please help.
Thanks

1 Reply

NG Naganathan Ganesh Babu Syncfusion Team February 6, 2020 12:29 PM UTC

Hi Rakhi, 
 
Please use “collectionChange” event to get the node/connector details while adding into the diagram. Also use “connectionChange” event to get source/target node details from the connector while changing the connection. Please refer to the below code example and sample. 
 
Code example: 
 
  public connectionChange(args: IConnectionChangeEventArgs): void {     
      if (args.state === 'Changed') { 
        let connector = args.connector; 
        //Get from/to node details using sourceid/targetId while changing the connection... 
     
 
  public collectionChange(args: ICollectionChangeEventArgs): void { 
      if(args.state === 'Changed'){ 
        let node = args.element; 
        //Get node/connector details from here while adding the node/connectors... 
     
 
 
 
Regards, 
 
Naganathan K G 
 


Loader.
Live Chat Icon For mobile
Up arrow icon