dojo调试增强了ItemFileReadStore的Grid

dojo调试增强了ItemFileReadStore的Grid,dojo,Dojo,我将遵循第3章“掌握Dojo”中的示例,使用dijox.grid.grid。我稍微修改了它以使用dojox.grid.EnhancedGrid。我已经编写了一个web服务,它以dojo所需的格式返回一些json。我已经独立测试了web服务,它返回正确的json。但是,当我将EnhancedGrid与ItemFileReadStore放在一起时,它不会在浏览器错误控制台中产生任何错误,也不会在网格中显示任何数据 我可以从这里采取什么步骤来调试它?是否有一些详细的调试标志我可以给dojo,以便它(希

我将遵循第3章“掌握Dojo”中的示例,使用dijox.grid.grid。我稍微修改了它以使用dojox.grid.EnhancedGrid。我已经编写了一个web服务,它以dojo所需的格式返回一些json。我已经独立测试了web服务,它返回正确的json。但是,当我将EnhancedGrid与ItemFileReadStore放在一起时,它不会在浏览器错误控制台中产生任何错误,也不会在网格中显示任何数据

我可以从这里采取什么步骤来调试它?是否有一些详细的调试标志我可以给dojo,以便它(希望)提示我出了什么问题

编辑:

以下是我正在做的:

<html>
    <head>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js" djConfig="parseOnLoad:true, isDebug:true"></script>
        <link rel="stylesheet" href="/css/main.css"/>
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/resources/dojo.css"/>
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dijit/themes/claro/claro.css"/>
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojox/grid/enhanced/resources/claro/EnhancedGrid.css"/>

        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojox/grid/enhanced/resources/EnhancedGrid_rtl.css"/>
        <script type="text/javascript">
            dojo.require("dojo.parser");
            dojo.require("dojo.data.ItemFileReadStore");
            dojo.require("dojox.grid.EnhancedGrid");
        </script>
    </head>
    </body class="claro">
        <style>
        #msgs {
            width=550px;
            height=200px;
        }
        </style>
        <div dojoType="dojo.data.ItemFileReadStore" jsId="xstore" url="/path/to/my/resource/data.json"></div>
        <table id="msgs" dojoType="dojox.grid.EnhancedGrid" store="xstore">
            <thead>
                <tr>
                    <th field="id" width="50">Id</th>
                    <th field="ts" width="100">Date</th>
                    <th field="msg" width="400">Message</th>
                </tr>
            </thead>
        </table>
    </body>
</html>
我想有一个悬而未决的问题:json有一个额外的列没有显示在表中(“custId”)。我希望这不会引起问题

编辑2:


另外,如果我进入firebug的DOM控制台,我可以看到xstore变量正确地保存了JSON中的数据。

两个有效的方法是:

在表格上设置内联样式以设置宽度/高度,或

设置EnhancedGrid属性autoHeight,这就是我最后要做的

{
    "identifier":"id",
    "items":[
        {
            "id":"3425",
             "custId":"2342525225",
            "ts":"2011-07-23T07:00:00Z",
             "msg":"test message"
        }
    ]
}