Monday, 16 November 2015

Extjs 4: How to clear tree nodes

There are two ways to remove the tree panel nodes.

Either we need to reload the treepanel store.



        getCmp('treePanelId').getStore().load();


Where treepanelId is the Id of tree. If you have the storeId then you can directly store.load() to remove the childs.

Removing the Child  Nodes is not necessary to reload the store.



        getCmp('treePanelId').getRootNode().removeAll();


No comments:

Post a Comment