or
@{ ViewBag.Title = "Tutorial 10";}<h2>Tutorial 10 - Remote DataSource</h2><!-- Tweets List --><ul id="twitter"></ul><script type="text/javascript"> // DataSource code var ds = new kendo.data.DataSource({ transport: { read: { dataType: "jsonp" } }, change: function () { var tweets = this.view(); $.each(tweets, function () { $("#twitter").append("<li>" + this + "</li>"); }); } }); // ds.read();</script>dataSource: { transport: { read: { url: JsonPath, dataType: "json" } } }, legend: { position: LegendPosition, visible: LegendVisible, template: "#= FormatLongText(value, 1) #", font: '8px Arial' },var gridDataSource = new kendo.data.DataSource({ transport: { read: { url: "mysite", dataType: "json", contentType: "application/json; charset=utf-8", type: "POST", data: function () { return { param: value }; } }, parameterMap: function (options) { return JSON.stringify(options); } }, schema: { model: { id: "id", fields: { name: { type: "string" }, domain: { type: "string" }, lastSeen: { type: "date" }, os: { type: "string" } } // End of fields }, // End of model data: "Entries", total: "TotalCount" }, sort: { field: "name", dir: "asc" }, pageSize: 14, serverPaging: true, serverSorting: true, serverFiltering: true});var devicesDataGrid = $("#devicesGrid").kendoGrid({ selectable: "row", dataSource: gridDataSource, autoBind: false, columnMenu: true, filterable: true, scrollable: false, sortable: true, resizable: true, height: 500, columns: [ { title: "Name", field: "name", template: "<a href='/GridVision/EditOrganizationDevice?organizationDeviceId=#= organizationDeviceId #'>#= name #</a>" }, { title: "Domain", field: "domain" }, { title: "Operating System", field: "os", template: '<div class="ellipsisCell" title="#= os #">#= os #</div>' }, { title: 'Last Seen', field: 'lastSeen', template: "#= kendo.toString(lastSeen, 'MMMM dd yyyy, h:mm tt') #" } ], pageable: { input: true, numeric: false, info: true },}).data("kendoGrid");gridDataSource.read();jQuery.support.cors = true;function sendRequestKendo(url) { ds = new kendo.data.DataSource({ transport: { read: { url: url, type: "GET" } }, change: onDataChanged, error: function(response) { alert(response.errorThrown); $("#loginError").show(); } }); ds.read();}function onDataChanged() { $("#results").html(kendo.stringify(ds.view()));}<httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="http://mydomain.com" /> <add name="Access-Control-Allow-Headers" value="Content-Type" /> </customHeaders></httpProtocol>$.ajaxSetup({ type: "GET", contentType: "application/json; charset=utf-8", dataType: "json"});$.ajax({ url: url, success: function() { }, error: function(response, status, err) { $("#loginError").show(); $("#errorMessage").html(err); }});