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

click event on node

HI

I need a demo on how to to get a pop up form  by clicking on a node in organizational diagram  to add informations about each employee

Thank you

1 Reply

SG Shyam G Syncfusion Team May 30, 2017 01:18 AM UTC

Hi Yasmine, 
 
Please use itemClick event to achieve your requirement. Please refer to the code example and sample below. 
 
Code example: 
 
<ej-dialog id="basicDialog" title="Dialog" [showOnInit]="showOnInit"> 
        <span id="text"></span> 
    </ej-dialog> 
 
<ej-diagram id="diagramCore" (itemClick)="onClick($event)"> 
                </ej-diagram> 
 
onClick(event) { 
        if (event.elementType === "node") { 
            $("#basicDialog").ejDialog("open"); 
            document.getElementById("text").innerHTML = event.element.name; 
        } 
    } 
 
 
In the above sample, we have shown the node name in the dialog box using diagram itemClick event. 
 
Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon