How to update dojo tree data dynamically

后端 未结 7 914
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 14:39

I would like to know how ot update the data of the dojo.dijit.tree component dynamically. At the moment I\'m creating the tree using dojo.data.ItemFileReadStore and dijit.tree.F

7条回答
  •  春和景丽
    2021-02-04 15:04

    Thanks for this function, works great in my tree.

    A notice to those who are new to dojo (like me)... After creation of the tree, it is needed to extend the tree with the refresh function:

    dojo.extend(dijit.Tree, {
        refresh: function() {
            this.dndController.selectNone();
            //...
        }
    });
    

    Then you can call the function with:

    dijit.byId('myTree').refresh();
    

提交回复
热议问题