我们有这样一种情况,我们需要在包含重复行的网格中显示数据库中的数据,但当单元数据与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>帮助!
发布于 2010-03-19 14:53:16
嗯,你可以从你的数据中删除标识符字段(historyData),网格就可以工作了。
https://stackoverflow.com/questions/2474564
复制相似问题