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

Select node

Hello.
Can i select a node from diagram in js function.
thank

1 Reply

SG Shyam G Syncfusion Team October 7, 2015 09:09 AM UTC

Hi Hamid,

Please use diagram’s clientside API method addSelection, which is used to add the selection for an element at runtime.  Please refer to the below code example.

Code example:

<div id="diagramcontent"></div>

    <script>

        var diagram = $("#diagramcontent").ejDiagram("instance");

        var node = diagram.model.nodes[0];

        diagram.addSelection(node);
    </script>

Regards,
Shyam G


Loader.
Live Chat Icon For mobile
Up arrow icon