View Full Version : TreePanel - load from object

John O Donovan
10 Feb 2011, 3:57 AM
Is it possible to use a local javascript object to load populate a TreePanel, and could you please post an example. The object could be either an array or an object.

One idea would possibly to load part of a json response (perhaps one department from a large list of departments in a json file), but this isn't all I want to do.

Thanks John

10 Feb 2011, 2:30 PM
I dont think ExtJS has a method to do that. You would probably have to build
the tree manually by adding nodes. Ext.tree.TreeNode has a method
insertBefore() which is useful for inserting nodes into trees.