剑道ui网格服务器端分页无法正常工作?

时间:2017-03-07 05:19:05

标签: kendo-ui pagination telerik kendo-grid kendo-ui-grid

我正在尝试使用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
}

0 个答案:

没有答案