Reputation: 1915
I try to add children to root node with this command.
tree.root.appendChild({ text : 'xxx' });
It doesn't work for no-children tree.
In other way, It work when I do this with tree that already initial with children node.
Thank you.
Upvotes: 0
Views: 1707
Reputation: 26
Please use below command.
Ext.getCmp('treepanelId').getRootNode().appendChild({ text : 'xxx' });
Ext.getCmp('treepanelId').doLayout();
Upvotes: 1