Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
EXTJS 2.2 EditorGridPanel不';不显示发送的数据存储_Extjs - Fatal编程技术网

EXTJS 2.2 EditorGridPanel不';不显示发送的数据存储

EXTJS 2.2 EditorGridPanel不';不显示发送的数据存储,extjs,Extjs,我正在使用ExtJS2.2,我已经使用过EditorGridPanel,当我加载数据存储时,网格不会加载发送的数据。它只加载空白的记录。我已经检查了响应JSON,发送的数据是正确的,它没有加载到我的editorgridpanel中。以下是一些代码: var debeRecord = Ext.data.Record.create([ {name: 'name', type: 'string'}, {name: 'last', type: 'string'}, {name:

我正在使用ExtJS2.2,我已经使用过EditorGridPanel,当我加载数据存储时,网格不会加载发送的数据。它只加载空白的记录。我已经检查了响应JSON,发送的数据是正确的,它没有加载到我的editorgridpanel中。以下是一些代码:

var debeRecord = Ext.data.Record.create([
    {name: 'name', type: 'string'},
    {name: 'last', type: 'string'},
    {name: 'id', type: 'string'}
    ]);

    var DebeStore = new Ext.data.Store({          
        url: 'clases/TestStore.php',
        fields: ['Name','Last','Id'],
        reader:new Ext.data.JsonReader({
            reader: 'datos',
            totalProperty: 'total',
        },debeRecord),
        listeners:{
            beforeload:function(){
                DebeStore.baseParams.idtransferencia = this.selectednode;
            },
            scope:this
        }           
    });


var cmDebe = [
        {
         id:'col1',
         header:'No.Doc',
         width:380,
         editor: new Ext.form.TextField({allowBlank: true}),
         dataIndex:'Name'
         },
        {
         header:'Last',
         width:380,
         editor: new Ext.form.TextField({allowBlank: true}),
         dataIndex:'Last'
         },
         {
          header:'Id',
          width:380,
          editor: new Ext.form.TextField({allowBlank: true}),
          dataIndex:'Id'
          }
                     ];

//GridPanel del DEBE
     var debeGridPanel = new Ext.grid.EditorGridPanel({
        frame:true,
        disabled:false,
        region:'center',
        id:'debeEditorGrid',
        split: true,
        autoScroll:true,
        title:'Listado de Transferencias (DEBE)',
        cls:'x-toolbar',
        tbar: [btnNewDebe, btnSaveDebe],
        //iconCls:'x-logo',
        autoExpandColumn:'col1',
        clicksToEdit: 1,
        store:DebeStore,
        sm:smDebe,
        loadMask:{
            msg :'Cargando Transferencias...'
        },
        columns: cmDebe,
        bbar: new Ext.PagingToolbar({
            pageSize: 20,
            store: DebeStore,
            displayInfo: true,
            displayMsg: 'Resultados de {0} - {1} de {2}',
            emptyMsg: "No hay resultados para mostrar."
        })
    });

//in the treepanel listeners click: function I load the store
click: function(node, e) {
                    this.selectednode = node.attributes['text'];
                    this.items.items[0].items.items[1].items.items[0].getStore().load({
                        callback: function(){
                            Ext.Msg.show({
                            title: 'Store Load Callback',
                            msg: 'store was loaded, data available for processing',
                            modal: false,
                            icon: Ext.Msg.INFO,
                            buttons: Ext.Msg.OK
                        });
                        }
                    });

dataIndex
是否与记录字段名称匹配?能否共享正在使用的json响应?是的,dataIndex与记录字段名称匹配这里是响应[{“名称”:“vb40052852”,“Last”:“fdsfsdf”,“Id”:“86952”},{“名称”:“vb400528525458”,“Last”:“askjdan”,“Id”:“52148554”},{“名称”:“vb4005285255454”,“Last”:“sdfsdf”,“Id”:“576425”},{“Name”:“sdfsdfsdf”,“Last”:“sdfsdfsdf”,“Id”:“4512365”}]