Cannot fire event on second level of tree and above

Good afternoon,

I need some help with this control, the treeview, the event "nodeClicked" work perfectly in the first level of the tree, but I cannot make it work on second level or a level beyond that (3,4,5, etc), the event just doesnt trigger dont know why

Probably I'm missing something, can you help me with this please?

Here is my code


<ejs-treeview id="listdata" showCheckBox="true" nodeClicked="nodeChecked">
                    <e-treeview-fields dataSource="ViewBag.treeCatList" isChecked="isChecked" id="id" parentId="pid" text="name" hasChildren="hasChild"></e-treeview-fields>
                </ejs-treeview>


function nodeChecked(args) {
        var checkedNode = [args.node];
        if (args.event.target.classList.contains('e-fullrow') || args.event.key == "Enter") {
            var getNodeDetails = this.getNodeData(args.node);
            if (getNodeDetails.isChecked == 'true') {
                this.uncheckAll(checkedNode);
                $("div[data-s1='" + getNodeDetails.id + "']").css("display", "none");
            } else {
                this.checkAll(checkedNode);
                $("div[data-s1='" + getNodeDetails.id + "']").css("display", "block");
            }
        }
    }

----
Thanks for your hard work






1 Reply

SP Sowmiya Padmanaban Syncfusion Team May 27, 2020 01:56 PM UTC

Hi Javier,  
 
Greetings from Syncfusion support. 
 
We have checked your reported problem with TreeView component. We are unable to reproduce it. NodeClicked event is triggered properly for inner level nodes . For your reference, we have prepared a sample using your code snippet. 
 
Refer the below screenshot. 
 
 
Refer the video link:  
 
Refer the sample link below. 
 
Refer the below link to know more about the TreeView component. 
 
 
 
 
If the issue still persist, can you please share the below details. It will help us to resolve your issue at the earliest. 
1.      Share the video footage for issue reproducing. 
2.      Exact use case for issue reproducing. 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya. P 


Loader.
Up arrow icon