1

我正在尝试使用 kendo-ui 网格实现服务器端分页。这是我的数据源配置。

"dataSource": {
            "serverPaging": true,
            "pageSize": 10,
            "schema":{
              "data": "data",
              "total": "total"
            },
            "transport": {
              "read": {
                "url": "http://localhost:9001/category/widget/kendoGridTest/trigger/data",
                "dataType": "json",
                "type": "GET"
              }
            }
 }

当我运行它时,它会不断发送服务器请求,但什么也没发生。发送请求是正确的,并且也得到了预期的响应。网格上没有数据绑定发生。

任何人都知道这里出了什么问题?

编辑:服务器响应

{
    "data": [
        {
            "CustomerID": "ALFKI",
            "CompanyName": "Alfreds Futterkiste",
            "ContactName": "Maria Anders",
            "ContactTitle": "Sales Representative",
            "Address": "Obere Str. 57",
            "City": "Berlin"
        },
        {
            "CustomerID": "YUI",
            "CompanyName": "Alfreds Futterkiste",
            "ContactName": "Maria Anders",
            "ContactTitle": "Sales Representative",
            "Address": "Obere Str. 57",
            "City": "Berlin"
        },
        {
            "CustomerID": "PKY",
            "CompanyName": "Alfreds Futterkiste",
            "ContactName": "Maria Anders",
            "ContactTitle": "Sales Representative",
            "Address": "Obere Str. 57",
            "City": "Berlin"
        },
        {
            "CustomerID": "PNY",
            "CompanyName": "Alfreds Futterkiste",
            "ContactName": "Maria Anders",
            "ContactTitle": "Sales Representative",
            "Address": "Obere Str. 57",
            "City": "Berlin"
        },
        {
            "CustomerID": "WSI",
            "CompanyName": "Alfreds Futterkiste",
            "ContactName": "Maria Anders",
            "ContactTitle": "Sales Representative",
            "Address": "Obere Str. 57",
            "City": "Berlin"
        },
        {
            "CustomerID": "FGH",
            "CompanyName": "Alfreds Futterkiste",
            "ContactName": "Maria Anders",
            "ContactTitle": "Sales Representative",
            "Address": "Obere Str. 57",
            "City": "Berlin"
        },
        {
            "CustomerID": "NMV",
            "CompanyName": "Alfreds Futterkiste",
            "ContactName": "Maria Anders",
            "ContactTitle": "Sales Representative",
            "Address": "Obere Str. 57",
            "City": "Berlin"
        }
    ],
    "total": 7
}
4

0 回答 0