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.
Unfortunately, activation email could not send to your email. Please try again.

Double Click to Edit Node when Template is Used

Thread ID:

Created:

Updated:

Platform:

Replies:

129899 Apr 7,2017 06:13 PM Apr 10,2017 07:33 AM JavaScript 1
loading
Tags: ejTreeView
Randy Craven
Asked On April 7, 2017 06:13 PM

Hello,


1.     When a TreeView uses templates to display the nodes, it appears that this disables using double click to edit the node text.  Is this correct?

2.     I see that F2 will still invoke an editor for the node text even when a template is used.  Is there a way to programmatically invoke this editor?

Thank You,

Randy Craven







Karthik Ravichandran [Syncfusion]
Replied On April 10, 2017 07:33 AM

Hi Randy, 
 
Thanks for contacting Syncfusion support. 
 
Query 1:  When a TreeView uses templates to display the nodes, it appears that this disables using double click to edit the node text.  Is this correct? 
 
When enable the template API in ejTreeView, we cannot edit the TreeView template data’s. You can achieve your requirement in application level by using TreeView create event. Please refer the below code block. 
 
 
function onTreeviewCreate() { 
    $(this.element).dblclick(function (event) { 
         // write your custom code for double click here 
     }) 
 
    $(this.element).keydown(function (event) { 
        if (event.which == 113) { 
            // write your custom code for F2 here 
        } 
    }) 
} 
 
 
 
You can get the tree view data using getTreeData method also you can able to refresh the tree view with updated data using ‘refresh’ method in tree view. To know more details about ejTreeView, please refer the below documentation link:

UG: https://help.syncfusion.com/js/treeview
 
 
 
Query 2: I see that F2 will still invoke an editor for the node text even when a template is used.  Is there a way to programmatically invoke this editor? 
 
Please track the incident #177001 regarding “Issue in TreeView while F2 key press”.  
 
 
Please let us know if you have any concerns. 
 
Regards, 
Karthik R 


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.

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.

;