or
$.ajax({
dataType: 'json',
type: 'POST',
contentType: 'application/json; charset=utf-8',
data: '{}',
url: 'api/dsl',
success: function (data) {
$("#grid").kendoGrid({
dataSource: {
data: data,
pageSize: 10
},
height: 750,
groupable: true,
scrollable: true,
sortable: true,
filterable: true,
pageable: true,
autobind: true
});
},
error: function (jqXHR, textStatus, errorThrown) {
alert("error: " + textStatus + ": " + jqXHR.responseText);
}
});
It seems i need to specify contenttype and data in order to have jquery play nice with IIS 7 (this post helped me: http://encosia.com/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/). It all started to work for me then when I set those properties on the ajax call.$("#autoCompleteInput").kendoAutoComplete({
<script> $(document).ready(function () { setTimeout(function () { createChart(); }, 400); $(document).bind("kendo:skinChange", function (e) { createChart(); }); }); function createChart() { var dataSource = new kendo.data.DataSource({ transport: { read: { url: "/MyService/GetGraph", dataType: "json" // additional parameters sent to the remote service// data: {// q: "html5"// } }, group: { field: "TransactionTypeName", dir: "asc" } } }); dataSource.read(); $("#chart").kendoChart({ theme: $(document).data("kendoSkin") || "default", dataSource: { data: dataSource }, title: { text: "Transaction Details" }, legend: { position: "bottom" }, seriesDefaults: { type: "column" }, series: [{ field: "TransactionAmount", name: "Transaction Name" }], categoryAxis: { field: "MonthString", labels: { rotation: -90 } }, valueAxis: { labels: { format: "{0:N0}" } }, tooltip: { visible: true, format: "{0:N0}" } }); } </script><tr data-sku="SOME DATA HERE">function onGridClick(arg) { var selected = $.map(this.select(), function (item) { return $(item).text(); }); // do something }$(item).attr('data-sku')