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
Extjs 如何在窗口容器内的网格/表格中显示列表?_Extjs - Fatal编程技术网

Extjs 如何在窗口容器内的网格/表格中显示列表?

Extjs 如何在窗口容器内的网格/表格中显示列表?,extjs,Extjs,我创建了一个窗口,如下所示: Ext.create({ xtype: 'window', title: "Name", closable: true, centered: true, maxWidth: 1000, minHeight: 100, maxHeight: 430,

我创建了一个窗口,如下所示:

Ext.create({
            xtype: 'window',
            title: "Name",
            closable: true,
            centered: true,         
            maxWidth: 1000,
            minHeight: 100,
            maxHeight: 430,
            minWidth: 350,
            scrollable: true,           
            items: [{
                xtype: 'container',
                html: record.data.Name,
                style: 'padding:10px'
            }]
}));
 Ext.create('Ext.data.Store', {
     model: 'User',
     data : [
         {Name: 'Peter, John, Mary'}        
     ]
 });
我的店铺如下:

Ext.create({
            xtype: 'window',
            title: "Name",
            closable: true,
            centered: true,         
            maxWidth: 1000,
            minHeight: 100,
            maxHeight: 430,
            minWidth: 350,
            scrollable: true,           
            items: [{
                xtype: 'container',
                html: record.data.Name,
                style: 'padding:10px'
            }]
}));
 Ext.create('Ext.data.Store', {
     model: 'User',
     data : [
         {Name: 'Peter, John, Mary'}        
     ]
 });
我想在我的窗口容器中以网格/表格的形式显示名称(这很好)。如下


有人能帮我吗?

您的代码不正确。无论如何


您正在使用哪个版本的ExtJs?哪个工具包:modern还是classic?exjs 6.5.3 modern网格和用户模型代码在哪里?{Name:'Peter,John,Mary'}我将其静态数据存储在Store中,以命名感谢您的解决方案。但在我的例子中,名字实际上是这样存储的{Peter,John,Mary}在数据存储中(像一个列表)。。我们需要一个for循环来将它们显示在单独的行中吗?好的,让我们从头开始。网格行表示存储的记录(模型)。如果您有一条记录,那么网格中将有一行。在您的情况下,您必须拆分记录值并将数据放入网格的存储中。