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

ejTreeview - nodeClick gets executed on exapand

Thread ID:





148429 Oct 18,2019 05:13 PM UTC Oct 21,2019 10:45 AM UTC ASP.NET Core 1
Tags: Treeview
D Wright
Asked On October 18, 2019 05:13 PM UTC

I have a simple folder treeview which load just fine.  However when I go to expand a node, it fires the nodeClick event for some reason.  Here is a snippet of the code:

                enableAnimation: true,
                enablePersistence: false,
                fields: {
                    dataSource: e.result,
                    id: "FolderId",
                    parentId: "ParentFolderId",
                    text: "FolderName",
                    hasChild: "IsParent",
                    imageUrl: $Url.resolve("~/Content/icons/folder.png")
                template: "#treeTemplate",
                nodeClick: function (e) {

I'm trying to allow the user to expand a folder and choose a child folder by selecting it. After selection, the user is able to navigate to that folder.  I'm using ASP.Net Core MVC FYI.



Keerthana Rajendran [Syncfusion]
Replied On October 21, 2019 10:45 AM UTC

Hi Dedrick Wright, 
Good day to you. 
We have checked your reported problem and provided code block at our end. We suspect that you are expecting to do some actions while clicking the tree node and not during the click of expand icon. If so,  we suggest you to use nodeSelect event to achieve this requirement. Please check the below sample. 
Please check the sample and get back to us, if you require any further assistance on this. 


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