首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >dojox.grid.DataGrid不能显示重复行吗?

dojox.grid.DataGrid不能显示重复行吗?
EN

Stack Overflow用户
提问于 2010-03-19 10:05:27
回答 1查看 1K关注 0票数 0

我们有这样一种情况,我们需要在包含重复行的网格中显示数据库中的数据,但当单元数据与Sorry, an error occurred相同时,似乎至少基本的示例失败了。下面是一个示例:

代码语言:javascript
复制
    <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>

帮助!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-03-19 14:53:16

嗯,你可以从你的数据中删除标识符字段(historyData),网格就可以工作了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2474564

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档