【发布时间】:2009-10-30 21:41:02
【问题描述】:
我正在使用 dojo 1.3,但无法让这个 dojox.grid.DataGrid 正常工作。我确信这是我的无知。我一直在阅读 Dojo Campus 的示例,并且相信我是对的。我的 html 看起来像:
<script type="text/javascript">
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.data.ItemFileWriteStore");
</script>
<div dojoType="dojo.data.ItemFileWriteStore" jsId="forumsStore" url="action/forum.JsonForums"></div>
<div id="ForumsListingArea" name="ForumsListingArea">
<div id="ListOfForumsContainer" name="ListOfForumsContainer">
<table dojoType="dojox.grid.DataGrid" query="{ID:'*'}" store="forumsStore" clientSort="true" style="width: 100%; height: 100%;" id="ListOfForums" name="ListOfForums">
<thead>
<tr>
<th field="title" width="200px">Title</th>
<th field="commentCount" width="200px"># Of Posts</th>
<th field="description" width="200px">Moderators</th>
<th width="200px">Del|Config</th>
</tr>
</thead>
</table>
</div>
</div>
萤火虫显示从数据存储返回的数据为:
{identifier:"ID",items:[{"ID":"1","description":"Test Forum","title":"Test","topics":[],"commentCount":"0"}]}
呈现内容时,我列出了表格列,但没有显示数据。我错过了什么明显的东西吗?
谢谢
【问题讨论】:
标签: javascript dojo