kendo datasource -> d7

datasource sample against d7 web api

by jwstott

HTML

<script src="http://cdn.kendostatic.com/2012.2.913/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.913/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.2.913/styles/kendo.common.min.css">
<div id="grid">
</div>

JavaScript 1.7

var sharableDataSource = new kendo.data.DataSource({
    transport: {
        read: {
            // the remote service url
            url: "http://d7.conveyclassrooms.com/api/engage/getlessons",
            // JSONP is required for cross-domain AJAX
            dataType: "jsonp",

            // additional parameters sent to the remote service
            data: {
                id: null
            }
        }
    },
    change: function() { // subscribe to the CHANGE event of the data source
        console.log('change event');
    }
});

$("#grid").kendoGrid({
    autoBind: true,
    dataSource: sharableDataSource,
    columns: [
        {
        field: "AssessmentType",
        title: "AssessmentType"},
    {
        field: "Id",
        title: "Id"},
    {
        field: 'Name',
        title: 'Name'}]

});

sharableDataSource.read();