Tuesday, January 31, 2012

KendoUI Grid and WebServices

Here is a simple example on how to do :

$(document).ready(function () {
        $("#grid").kendoGrid({
            columns: [
              {
                  field: "id",
                  title: "ID"
              },
              {
                  field: "Email",
                  title: "Email"
              }],

            dataSource: {
                transport: {
                    read: {
                        type : "POST",
                        url  : "http://localhost/WebService.asmx/GetAdmin",
                        data : null,
                        contentType : "application/json; charset=utf-8",
                        dataType: "json",
                        async: true
                    }
                },
                schema : {
                    data: "d"
                }
            }           
        });
    });

No comments:

Post a Comment