Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/444.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/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
Javascript 如何使用sencha中的action列加载第二个datagrid_Javascript_Extjs_Datagrid - Fatal编程技术网

Javascript 如何使用sencha中的action列加载第二个datagrid

Javascript 如何使用sencha中的action列加载第二个datagrid,javascript,extjs,datagrid,Javascript,Extjs,Datagrid,我有一个显示数据的datagrid,用户可以在此datagrid上选择“查看”操作列。发生这种情况时,用户应在新的gridpanel中查看所选行的详细信息。我正在操作列中为此网格填充一个新存储,如下所示: 操作列处理程序: //code in action column handler var store; console.log ('About to load the store'); var rec = view.getStore().getAt(rowIndex); var ro

我有一个显示数据的datagrid,用户可以在此datagrid上选择“查看”操作列。发生这种情况时,用户应在新的gridpanel中查看所选行的详细信息。我正在操作列中为此网格填充一个新存储,如下所示:

操作列处理程序:

 //code in action column handler
var store;


console.log ('About to load the store');


var rec = view.getStore().getAt(rowIndex);
var rowid = rec.get('ID');

store = Ext.getStore('MetadataJsonPStore').load({
    params:{
        solution: 'DemoDocuments',
        project: 'MyDemoDocuments',
        process : 'RetreiveFileMetadata',
        user :'admin',
        password :'changethis',
        waittofinish :'true' ,
        FileID : rowid
    },

    callback: function(records, options, success) {
        if(success) {
            var fileMetadataPanel = Ext.getCmp('matadataPanel');
            //if (records.length = 0)
            console.log(records[0])
            ;
        }
        else {
            Ext.Msg.alert('Request Failed','Service currently not available');
        }
    }//end-callback-function
}); 
我的存储已正确填充,但我的网格未显示。当我查看我的控制台时,我没有错误,所以我认为我错过了一个步骤


我的datagrid链接到一个存储(上面加载的存储),但数据不显示。关于如何完成这个功能有什么想法吗

您需要刷新该网格视图

森查:

其他解决方案


在呈现新网格视图之前加载store2上的数据

如果加载store,则不需要刷新网格,它会自动发生。我知道,加载后网格会自动刷新。。。但也许这是一个解决方案,因为这是我的第二个解决方案。我读这篇文章是为了放弃你的答案类型:“我的datagrid链接到一个存储”,但它可能是你的答案的解决方案……你确定你的网格正确链接到你的加载存储吗?尝试调用网格的
getStore()
,然后进行检查。
gridView = this.getCmp('gridID');

grid.refresh();