Reputation: 153
How can I build a tree ins Sencha Architect? All what I found online was concerned with editing the code which is read-only in my case. What can I do about that?
Please help! I would really appreciate it because I've been having a hard time figuring it out.
Thank you in advance
Upvotes: 2
Views: 1661
Reputation: 16847
TreeStore
with the config specified below*TreePanel
with {store: 'TreeStore', rootVisible: false}*
fields: [{
name: 'text'
}],
//please note that you need to wrap the root config inside an object {}
root: {
expanded: true,
children: [
{ text: "detention", leaf: true },
{ text: "homework", expanded: true, children: [
{ text: "book report", leaf: true },
{ text: "algebra", leaf: true}
] },
{ text: "buy lottery tickets", leaf: true }
]
}
Edit1:
Press this GREEN icon to edit the root config.
Upvotes: 2