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

How to fire an event when a tree node is double clicked

Hello,

I want to know that how to fire an event when a tree node is double clicked.

Regards,

1 Reply

SN Sasikala Nagarajan Syncfusion Team March 11, 2015 03:44 PM UTC

Hi Muhammad,

Thanks for using Syncfusion products,

We have analyzed your query (how to fire an event when a tree node is double clicked). If the parent tree node is double clicked then the “beforeExpandCollapse” event will be triggered. If we double clicked the child tree node no other events will be triggered (if allowEditing is in false).

If we enable the node editing (set ‘allowEditing’ as true) for treenode then “beforeEdit” event will be triggered even for the parent tree node (Its will not expand/collapse if we double clicked).

If you want to trigger the custom event when tree node is double clicked then we need to bind the “dblclick” event manually. Please refer the below code snippet

[script]

$(" #treeView a.e-text").bind("dblclick",function()

                                    {

                                    alert("itemclicked");

                                    });

This event will be triggered before tree view’s default events (“beforeExpandeCollapase, nodeEditing") get triggered.

For your convenience, we have prepared the sample based on your requirement. Please get the sample from below location.

Sample
Please check with the given sample and let us know if you have further queries.
Regards,

Sasikala Nagarajan

Loader.
Up arrow icon