View Full Version : Are text and children attribute mandatory in a json for Tree Store

3 Feb 2012, 1:42 AM
I find text and children mandatory in json data that is been passed to a tree store. For example

var store = Ext.create('Ext.data.TreeStore', {
model: 'Task',
proxy: {
type: 'ajax',
//the store will get the content from the .json file
url: 'treegrid.json'
folderSort: true

treegrid.json example where in it starts with text:".",children:

{"text":".","children": [
task:'Project: Shopping',
user:'Tommy Maintz',
expanded: true,


var treeStore = Ext.create('Ext.data.TreeStore', {
model: 'TableModel',
root : {"text":".", "children" : convertedScenariosData},
folderSort: true

How can i directly pass the json with out text and children attributes in it

3 Feb 2012, 2:00 AM
Please use code tags for your code (the hash sign you see when writing a post).

If you say leaf: true, then you shouldn't need children.