1

我已经使用 DHTMLX 创建了一个网格。我使用 linq 从数据库中检索了数据。我能够在输出中显示数据。但是这些没有加载到网格中。现在我想将数据加载到网格中使用 JSON 对象。

4

1 回答 1

-1

这是有关您的问题的在线示例。我认为它必须帮助你:

http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/12_initialization_loading/09_init_grid_json.html

JSON语法是下一个:

data = {
    rows: [{
        id: 1001,
        data: ["100", "A Time to Kill", "John Grisham", "12.99", "1", "05/01/1998"]
        }, {
        id: 1002,
        data: ["1000", "Blood and Smoke", "Stephen King", "0", "1", "01/01/2000"]
        }, {
        id: 1003,
        data: ["-200", "The Rainmaker", "John Grisham", "7.99", "0", "12/01/2001"]
        }, {
        id: 1004,
        data: ["350", "The Green Mile", "Stephen King", "11.10", "1", "01/01/1992"]
        }
    }
于 2013-08-13T13:46:49.820 回答