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
close icon

How can I call inline edit manually?

Hi.

I need to make inline edit for tree items. By double click event it works ok.  But how I can use my separate button "Edit" for this?
Could you please give advice how can I do this?

Thanks.



3 Replies

AB Ashokkumar Balasubramanian Syncfusion Team July 18, 2017 02:16 PM UTC

Hi Stanislav, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your requirement (“Edit the TreeNode using button click event”). You can achieve your requirement by manually calling the dblclick method. Please check the below code snippet. 
 
[Script] 
        var treeObj=$("#treeView").ejTreeView("instance"); 
        //get the selected node 
        var node = $(treeObj.getSelectedNode()); 
        var target = $(node).find("a.e-text"); 
        setTimeout(function () { 
                target.dblclick(); 
        }, 50); 
 
For your reference, we have prepared the simple sample, please check the sample in below playground location. 
 
 
Please let us know, if you the provided information’s are helpful to achieve your requirement or not. 
 
Regards, 
Ashokkumar B. 



ST Stanislav July 18, 2017 02:37 PM UTC

I tried the same, but without setTimeout.

Yes, now this working.

Thanks a lot!



AB Ashokkumar Balasubramanian Syncfusion Team July 19, 2017 06:07 AM UTC

Hi Stanislav, 
 
Most Welcome. 
 
Please let us know if you need further assistance. 
 
Regards, 
Ashokkumar B. 


Loader.
Live Chat Icon For mobile
Up arrow icon