Updating the text of a node

2 posts, 1 answers
  1. Keith
    Keith avatar
    9 posts
    Member since:
    Jan 2014

    Posted 06 Mar 2014 Link to this post

    Hi all,

    I am trying to update the text of a node without having to refresh the whole tree. 
    Is this possible?

    I have tried unsuccessfully with the following:
    var treeview = $("#ProcessTree").data("kendoTreeView");
    var node = treeview.dataItem(treeview.select());
    node.Name = "Updated Text";
    treeview.collapse(node);
    node.loaded(false);
    node.load();
    treeview.expand(node);

    Thanks,
    Keith. 

  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 06 Mar 2014 Link to this post

    Hello Keith,

    Use the following:

    var treeview = $("#ProcessTree").data("kendoTreeView");
    var node = treeview.dataItem(treeview.select());
    node.set("Name", "Updated Text");

    This will trigger the TreeView binding.

    Regards,
    Alex Gyoshev
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top