开发者

dojox.grid.DataGrid can't display repeat rows?

We have a situation where we need to display data from a database in a grid which has repeat rows, but it seems at least the basic examples fail when the cell data is identical with Sorry, an error occurred. An example follows:

           
    <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': 开发者_如何学Python'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>

Help!


Hmm, you can remove identifier field from your data (historyData) and grid should work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜