我们需要在具有重复行的网格中显示来自数据库的数据,但是当单元格数据与Sorry, an error occurred
相同时,至少基本示例似乎失败。一个例子如下:
<script>
dojo.require("dojo.data.ItemFileWriteStore");
dojo.require("dojox.grid.DataGrid");
var historyData = {
'identifier': 'time',
'label': 'time',
'items': [
{
'message': 'Please turn in your TPS reports immediately',
'time': 'March 3 2010 7:20 AM',
'sentBy':'Bill Lumbergh'
},
{
'message': 'Please turn in your TPS reports immediately',
'time': 'March 3 2010 7:20 AM',
'sentBy':'Bill Lumbergh'
}]
};
var historyGridLayout = [
[{
field: "message",
name: "Message"
},
{
field: "time",
name: "Display Date & Time"
},
{
field: "sentBy",
name: "Sent By"
}]];
</script>
<body class="tundra ">
<div dojoType="dojo.data.ItemFileWriteStore" data="historyData" jsId="historyStore">
</div>
<div id="grid" dojoType="dojox.grid.DataGrid" store="historyStore" structure="historyGridLayout">
</div>
</body>
帮助!
答案 0 :(得分:1)
嗯,您可以从数据中删除标识符字段(historyData),网格应该可以正常工作。