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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Event only in the last nodes

Thread ID:





142363 Jan 30,2019 12:06 AM UTC Feb 4,2019 09:03 AM UTC ASP.NET Core 3
Tags: Treeview
Corazon Cruz Sanchez
Asked On January 30, 2019 12:06 AM UTC


How can I have the event node-select = "onNodeSelected" is the last node, because
When selecting any node, it sends me to call the event and I only want it for the
last nodes.


           Node one
           Node two
           Node three
           Node four

I only want the event for the nodes (Node one, node two, node 3 and node 4)

Or what other event can I use for the last nodes


Deepa Loganathan [Syncfusion]
Replied On January 30, 2019 01:17 PM UTC

Hi Corazon, 

Thanks for contacting Syncfusion support. 

We have checked your requirement - "To trigger node-select event for last nodes alone in TreeView". In our TreeView component, the node-select event is triggered on selecting any node. However you can find if the selected Node is the last item and perform action based on that as given in the below code.  

function onNodeSelected(args) { 
if (!this.hasChildNode(args.currentElement[0])){ 
//Perform your required operations here 

Please check it and get back to us if you have any concerns. 

Deepa L. 

Corazon Cruz Sanchez
Replied On February 1, 2019 05:35 PM UTC

Hi Deepa,

My problem was solved, thank you very much.


Silambarasan I [Syncfusion]
Replied On February 4, 2019 09:03 AM UTC

Hi Corazon, 
Thanks for your update. We are happy to hear that your requirement has been achieved. 
Please get back to us if you need any further assistance. 


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

Live Chat Icon For mobile
Live Chat Icon