Search code examples
extjsextjs4extjs-gridextjs-stores

Unable to show data in ExtJS Tree Grid


I just copied the example of ExtJS tree grid from Sencha's site. I created a fiddle with only difference being, I am using local data instead of using proxy & I have removed some columns.

Please check this fiddle and tell me why I am not able to see data in the grid?

Thank you!!!


Solution

  • Tree stores don't have a data option (search for it in the docs). Memory proxies, on the other hand, do. So you can put your data in it to solve your problem:

    var store = Ext.create('Ext.data.TreeStore', {
        model: 'Task',
        proxy: {
            data: JData,
            type: 'memory'
        },
        folderSort: true
    });