This is a migrated thread and some comments may be shown as answers.

Kendo Grid Infinite Spinner

1 Answer 246 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 12 Jul 2013, 05:25 PM
My Kendo Grid is not displaying any of the data. I am trying to pull down JSON from a web method in an aspx page. I keep getting the never ending spinner. I am new to using these controls and am banging my head against my desk for a day now. 

    $('#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


    });

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 15 Jul 2013, 07:55 AM
Hello Will,

I assume that the problem is connected with the format of the server response. Do you see any JavaScript errors in the browser's console? Can you try to pass the whole response to the dataSource, not just the "d" field. To illustrate what I mean:
schema: {
    data: 'd'
},
transport: {
    read: function (options) {
        var o = options;
        $.ajax({
            type: 'POST',
            url: 'ServiceMonitoring.aspx/GetGridInformation',
            dataType: 'json',
            data: '',
            contentType: 'application/json; charset=utf-8',
            success: function (msg) {
                o.success(msg);
            }
        });
    }


Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Will
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or