0

I created a tree structure in my backend code and using this and now I need to set these records to a tree store, without traversing the tree again.

How can I replace or set these records to my tree store? What I do is like below but it doesn't work tree.getRootNode().childNodes = records;

Here are my records:

enter image description here

Community
  • 1
  • 1
gabi
  • 1,324
  • 4
  • 22
  • 47
  • I would try to serialise the data and "set" them into a store with [setData](https://docs.sencha.com/extjs/5.1/5.1.1-apidocs/#!/api/Ext.data.TreeStore-method-setData) – Michel Jan 11 '16 at 12:44
  • tree.getRootNode().removeAll();tree.getRootNode().appendChild(records); – yorlin Jan 12 '16 at 11:53

0 Answers0