简体   繁体   English

kendo网格未加载数据Web表单

[英]kendo grid not loading data webforms

I am having a lot of difficulty getting kendoGrid to bind to JSON data from a web method in an ASPX page. 我很难让kendoGrid从ASPX页面中的Web方法绑定到JSON数据。 I keep getting the infinite spinner. 我不断得到无限旋转器。 The JSON is coming down from the ajax call. JSON来自ajax调用。 I dont know why its not binding to the grid. 我不知道为什么它不绑定到网格。 Here is my JS. 这是我的JS。

$('#grid').kendoGrid({
    columns: [
           {
               field: "ClientName",
               title: "ClientName"

           }],
    dataSource: {
        type: 'json',
        serverPaging: true,
        schema: {
            data: 'd'
        },
        transport: {
            read: function (options) {
                $.ajax({
                    type: 'POST',
                    url: 'ServiceMonitoring.aspx/GetGridInformation',
                    dataType: 'json',
                    data: '',
                    contentType: 'application/json; charset=utf-8',
                    serverPaging: true,
                    success: function (msg) {
                        options.success(msg.d);
                    }
                });
            }

        }
    },
    height: 200,
    pageSize: 10


});

I knw this is a bit too late for you but try using 我知道这对您来说为时已晚,但请尝试使用

data: JSON.parse(d) 数据:JSON.parse(d)

Hope this will help others who face this problem. 希望这会帮助其他面临此问题的人。

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM