How to refresh a tree node on context menu click event

Hello Guys,

i want to clear a tree node and reload it again on context menu click .please check this snippet



  • @webix team any update?

  • edited January 2018

    To delete a node (parent or child) you should use the remove method and specify the id of the required node there:

    tree = webix.ui({ view:"tree",... });
    var nodeId = tree.getSelectedId();

    And you can use clearAll and parse to reload it

  • @Nastja thank you for your reply but my requirement is to reload the specific node on context menu click event

  • @qadirkanore can you please clarify, do you intend to reload the branch (child nodes) or just the specific node where the context option is clicked?

  • loadBranch is intended for one-time branch loading, so in order to reload it again, you need to use a custom ajax request

    As for updating one item, if your backend is tuned for returning one record, you can make a custom request and updateItem with the new data:

         var update = data.json();
         tree.updateItem(nodeId, update);
  • @Listopad i want to reload the child of the node.Thanks a lot for the snippet it helped me to fix my issue

  • Hi,
    How do I refresh a node if I am using the 'url' property to let the Tree component handle Dynamic loading of each child, as per
    I have tried using $$("MyTree").Refresh( but this does not do anything!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!