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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Event only in the last nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,


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.







Example

2019
     January
           Node one
           Node two
     February
           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

Regards!





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.  

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

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

Regards,
Deepa L. 


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

Hi Deepa,

My problem was solved, thank you very much.

Regards,

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. 
 
Regards, 
Silambarasan 


CONFIRMATION

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

;