日期:2014-05-16  浏览次数:20358 次

EXT 的 Treegrid 需要什么格式的JSON数据 ?
我现在用的是普通的GRIDPANEL    改成Treegrid后并未报错   但数据不显示
是因为后台的JSON格式不正确吗 ?   JSON如下:

{root:[{"MODULE_CD":1,"MODULE_NM":"客户产品依赖","PARENT_CD":0,"PARENT_NM":"","URL":"","INDATE":"","UPTDATE":""},{"MODULE_CD":28,"MODULE_NM":"仓库数据维护","PARENT_CD":17,"PARENT_NM":"","URL":"","INDATE":"","UPTDATE":""},{"MODULE_CD":31,"MODULE_NM":"工厂统计报表","PARENT_CD":0,"PARENT_NM":"","URL":"","INDATE":"","UPTDATE":""}],success:true}



------解决方案--------------------
肯定不正确了,ext不是有demo,自己看demo提供的数据源,而且是treestore,grid的store数据源不行

{"text":".","children": [
    {
        task:'Project: Shopping',
        duration:13.25,
        user:'Tommy Maintz',
        iconCls:'task-folder',
        expanded: true,
        children:[{
            task:'Housewares',
            duration:1.25,
            user:'Tommy Maintz',
            iconCls:'task-folder',
            children:[{
                task:'Kitchen supplies',
                duration:0.25,
                user:'Tommy Maintz',
                leaf:true,
                iconCls:'task'
            },{
                task:'Groceries',
                duration:.4,
                user:'Tommy Maintz',
                leaf:true,
                iconCls:'task',
                done: true
            },{
                task:'Cleaning supplies',
                duration:.4,
                user:'Tommy Maintz',
                leaf:true,
                iconCls:'task'
            },{
        &