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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding multiple Nodes Connectors to Diagram with one Drag and drop from Palette

Thread ID:





131806 Jul 27,2017 06:52 PM UTC Aug 4,2017 04:35 AM UTC ASP.NET Web Forms 3
Tags: Diagram
Fabian Lorenz
Asked On July 27, 2017 06:52 PM UTC

Hi Syncfusion Team,
I am using Diagram Builder Sample from Showcase Samples (Web Forms).
Like the subject says, I want to drag one Item from Palette to diagram which morphs
macro-like to multiple Connectors and Nodes (Like a macro or shortcut).
I came up with the following solution:

-Define a BasicShape which is added to Palette
-catch the element in the nodeOnDrop javascript function
-remove the Element
-define the connectors and nodes myself in javascript
-add it to the diagram where the Pallette item was dropped

Unfortunately I cant remove the Element, because it seems to
get added by another function after nodeOnDrop has finished.
I was not able to find the place where the node was added to
diagram. Maybe you can point me to the place in the source
files. As I said I used the source Code from Diagram Builder
in Showcase Samples.


Shyam G [Syncfusion]
Replied On July 28, 2017 06:28 AM UTC

Hi Fabian, 
To achieve your requirement, please cancel the drop event by setting args.cancel=true and then add a new nodes and connectors. Please refer to the code example below. 
Code example: 
DiagramContent.OnClientDrop = "nodeondrop"; 
function nodeondrop(args) { 
    args.cancel = true; 
    //add a new node 
diagram.add({ name: "firstNode", width: 100, height: 100, offsetX: args.element.offsetX, offsetY: args.element.offsetY }); 
Shyam G 

Fabian Lorenz
Replied On August 3, 2017 03:45 PM UTC

Hi Shyam,

works as expected. Nice and simple. Thank you!

Shyam G [Syncfusion]
Replied On August 4, 2017 04:35 AM UTC

Hi Fabian, 
Please let us know if you need further assistance on this. 
Shyam G 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon