开发者

How to represent data from JSON in GridView ( table )

I have JSON file like this format

{
    "Alarms":[

    ],
    "BAE":[

    ],
    "Open":[

    ],
    "Timeout":[
        2,3,4,5,6,7,9
    ],
    "End Switches":[

    ],
    "Bus Power":[

    ],
    "External Power":[
        1,2,3,4,5,6,7,8
    ]
}

where Alarms, BAE, Open... are columns . I need to represent like GridView in ASP.NET ( like table with pagination ). How to do that using Dojo ? Is there any 开发者_JAVA技巧widget which automatic represent JSON file in table form ?


You need to do 2 things:

  1. Put your json data into a data store
  2. Bind the data store to a grid widget

Since you need pagination, you should use the dojox.grid.Enhanced widget and enable pagination. Dojo does not offer a simple HTML table-from-json widget that also supports pagination.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜