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 Selected Node from Javascript

Hi,

Would like to know what is the way to obtain the selected node from the object Diagram via javascript?

We have obtained the object for diagram via

var diagramObj = $("#DiagramName").data("ejDiagram");



3 Replies

SG Shyam G Syncfusion Team September 25, 2014 04:46 AM UTC

Hi Chong

Thanks for using Syncfusion products.

We have created a simple sample to meet your requirement and attached below. Please see the below code snippet.

Code snippet:

 

            var diagram = $("#Diagram1").data("ejDiagram");

            // to get selected node

            var node = diagram.selectionList[0];

Please let me know if any concerns.

Regards,

Shyam G


Attachment: TestDiagramViewer_(2)_31d48f09.zip


CY Chong Yee Mei September 29, 2014 01:15 AM UTC

Hi Shyam,

Got it, thanks!


SG Shyam G Syncfusion Team September 29, 2014 11:05 AM UTC

Hi Chong

We are happy to hear that your problem gets resolved.

Please let me know if any concerns.

Regards,

Shyam G


Loader.
Live Chat Icon For mobile
Up arrow icon