Get Node from click event for Diagram HierarchicalTreeService

How can I get the node associated with a click event on a HierarchicalTreeService diagram.  I tried the nodeClickEvent but this does not seem to fire for this type of diagram.  The click event fires but I don't know how to identify a node or connection from the data returned by the click event. 

 


3 Replies 1 reply marked as answer

MG Moulidharan Gopalakrishnan Syncfusion Team October 11, 2024 06:23 AM UTC

Hi Michael,

We have created a sample for your requirement. You can retrieve the information of a node when it is clicked by using the click event from the event arguments. The click event arguments contain details about the actual object that was clicked, which button was clicked, the click count, and the position. Please refer to the sample and documentation for further guidance

Documentation: IClickEventArgs API in Angular Diagram API component - Syncfusion
Sample: 56iz47 (forked) - StackBlitz


Regards,
Moulidharan


Marked as answer

MI Michael October 11, 2024 05:56 PM UTC

That worked. Thank you for your quick reply. 



PR Preethi Rajakandham Syncfusion Team October 14, 2024 06:33 AM UTC

Hi Michael,

You're welcome. 

We are glad that the provided response meets your requirement. Please let us know if you need further assistance. As always, we are happy to help you out. 

Regards,

Preethi R


Loader.
Up arrow icon