Javascript 网格运行良好,但不显示任何数据

Javascript 网格运行良好,但不显示任何数据,javascript,json,extjs,grid,Javascript,Json,Extjs,Grid,这里有网格面板: Ext.require([ 'Ext.direct.*', 'Ext.data.*', 'Ext.grid.*' ]); Ext.define('PersonalInfo', { extend: 'Ext.data.Model', fields: [ 'name', 'email'] }); Ext.onReady(function() { // create the Grid Ext.create('Ext.grid.

这里有网格面板:

Ext.require([
    'Ext.direct.*',
    'Ext.data.*',
    'Ext.grid.*'
]);
Ext.define('PersonalInfo', {
    extend: 'Ext.data.Model',
    fields: [ 'name', 'email']
});

Ext.onReady(function() {
    // create the Grid
    Ext.create('Ext.grid.Panel', {
        store: {
            model: 'PersonalInfo',
            autoLoad: true,
            proxy: {
                type: 'ajax',
                 url : 'app/data/users.json',
                reader: {
                    type: 'json',
                    root: 'users'
                }
            }
        },
        columns: [{
            dataIndex: 'name',
            width: 50,
            text: 'ID'
        }],
        height: 450,
        width: 700,
        title: 'Velociraptor Owners',
        renderTo: Ext.getBody()
    });
});
这里的users.json文件的扩展名是app/data/users.json:

{
    "users": [
        { "name": "Name 1" , "email": "email@site.com" },
        { "name": "Name 2" , "email": "email@site.com" },
        { "name": "Name 3" , "email": "email@site.com" },
        { "name": "Name 4" , "email": "email@site.com" },
        { "name": "Name 5" , "email": "email@site.com" }
    ]
}

网格显示在我的浏览器上(Firefox.IE9不显示任何内容),但没有像我告诉它的那样显示“name”字段。有什么想法吗?

这对我使用4.2.1的Chrome 28和IE9都很好。您使用的是哪个版本?你确定这不是AJAX问题吗?i、 e您确定返回了数据吗?检查您通过AJAX请求获得的JSON数据似乎很完美。+1是一个很好的标题。