or
var myQuotes = new kendo.data.DataSource({ transport: { read: "" }, schema: { data: "d", schema: { model: { fields: { Carrier: { type: "number" }, ErroMsg: { type: "string" }, Key: { type: "string" }, Price: { type: "number" }, Service: { type: "number" }, Sig: { type: "number" }, WeightLbs: { type: "number" }, WeightOz: { type: "number" } } } } } });
myQuotes.transport.options.read.data = "d"; myQuotes.transport.options.read.url = 'ws/srvQuickQuote.svc/Quote'; myQuotes.fetch(function () { $("#grid").kendoGrid({ dataSource: myQuotes, height: 600, scrollable: true, sortable: true, filterable: true, pageable: true, columns: [ { field: "Carrier", type: "number", title: "Carrier" },{ field: "Service", type: "number", title: "Service" },{ field: "Sig", type: "number", title: "Signature" },{ field: "Price", type: "number", title: "Price" },{ field: "ErrorMsg", type: "string", title: "ErrorMsg" } ] } ); });
$(document).ready(function () { $("#grid").kendoGrid(...); var grid = $("#grid").data("kendoGrid"); //alert(1); var selection = grid.tbody.find(">tr").eq(1); grid.select(selection);}$(document).ready(function () { var grid = $("#grid").kendoGrid(... dataBound: function() { var selection = grid.tbody.find(">tr").eq(1); grid.select(selection); } ).data("kendoGrid");;}$(document).ready(function () { $("#DDL").kendoDropDownList(...); //alert(1) DDL.value(1);} $.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')