This is a migrated thread and some comments may be shown as answers.

Clientside, initiate RadTreeNode edit

1 Answer 24 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Gordon
Top achievements
Rank 1
Gordon asked on 14 May 2010, 01:27 PM
I'm adding a treenode like this;

    function AddNode(parentNode) { 
      var tree = $find("<%= tvCategory.ClientID %>"); 
      tree.trackChanges(); 
      var node = new Telerik.Web.UI.RadTreeNode(); 
 
      node.set_text("New Node"); 
      node.set_imageUrl("<%= NodeImageURL %>"); 
 
      if (parentNode == null) { 
        tree.get_nodes().add(node); 
      } 
      else { 
        parentNode.get_nodes().add(node); 
        parentNode.expand(); 
      } 
 
      tree.commitChanges(); 
 
      node.BeginEdit(); 
    } 

I'd like to be able to initiate the editing of the newly added node in order for the user to easily change the node text; "New Node"

Is it possible, can you provide the js code?

1 Answer, 1 is accepted

Sort by
0
Gordon
Top achievements
Rank 1
answered on 14 May 2010, 01:32 PM
Ok, found out.

      node.startEdit(); 

not

node.BeginEdit();  



Tags
TreeView
Asked by
Gordon
Top achievements
Rank 1
Answers by
Gordon
Top achievements
Rank 1
Share this question
or