title: Change a Kendo TreeView Node Name with Javascript - I don't see how to do this
body: <p>I am wanting to Edit the name of a parent Node that I select</p>
  
  <ol>
  <li><p>I know how to <strong>Add</strong> a New Parent Node with javascript  <strong>append</strong></p>
  
  <pre><code>var selectedNode = treeview.select();
  treeview.append({ ReportGroupName: $("#addNodeText").val()  
  </code></pre></li>
  <li><p>I know how to display the selected Node in a textbox </p>
  
  <pre><code> $("#groupNameSelected").val(nodeName);
  </code></pre>
  
  <p>-- which is called with  <code>select: onSelect,</code></p></li>
  </ol>
  
  <p>However , I want to <strong>CHANGE</strong> the <strong>Node</strong> <strong>Text</strong></p>
  
  <p>I was googling and looking at the API ,  I want a clean javascript or jquery way to simply update the treeview</p>
  
  <p>I have been setting the code up like this</p>
  
  <pre><code>var treeview = $("#treeview").data("kendoTreeView");
  var selected = treeview.select(), item = treeview.dataItem(selected);
  
  if (item) {
     console.log('Selected item: ' + item.ReportGroupName + ' : ' + item.Id + ' (uid: ' + item.uid + ')');
  }
  </code></pre>
  
  <p>But how do I just Change the Treeview selected node text ?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I found this code on a telerik forum.<br>
  It does change the text, but AFTER I try and write the <strong>treeview data</strong> out </p>
  
  <pre><code> console.log(mydatasource.data());  // i expect this to change as adding nodes does update this ...
  
  
  
  function refreshTreeNode(data)
  {
      var currentText = $("#treeview").data("kendoTreeView").select().find('span.k-in').first().text();
      var node = $("#treeview").data("kendoTreeView").select().find('span.k-in').first();
      var nodeSpan = $("#treeview").data("kendoTreeView").select().find('span.k-in &gt; span.k-sprite').first();
      node.text('');
      node.append(nodeSpan);
      node.append(data);
  }
  </code></pre>
  
  <p>The changes to the data are not occurring to the treeview data, only on the UI i see the change.  why?</p>