or
function createGridMission(a){ var element = $("#gridF01").kendoGrid({ dataSource: { data: a, pageSize: 6, serverPaging: true, serverSorting: true }, height: 450, sortable: true, pageable: true, detailInit: detailInit, columns: [ { field: "mission", title: "Mission" } ] }); function detailInit(e) { $("<div/>").appendTo(e.detailCell).kendoGrid({ dataSource: { transport: { read: { url: "/Mob/Client/Tableau?mission=" + a + "&id=" + $("#hidCodeClient").val(), dataType: "json" } }, serverPaging: true, serverSorting: true, serverFiltering: true, pageSize:6, filter: { field: "mission", operator: "eq", value: e.data.mission } }, scrollable: false, sortable: true, pageable: true, columns: [ { field:"periode", title:"Période" }, { field:"debut", title:"Début" }, { field:"fin", title:"Fin" }, { field: "quantite", title:"Quantité" }, { field:"production", title:"Production" }, { field:"facturation", title:"Facturation" }, { field:"solde", title:"Solde" }, { field:"dateSolde", title:"Date solde" } ] }); }}"editor": function(container, options) { $('<input id="' + options.field + '" />') .appendTo(container) .kendoDropDownList({ dataTextField: 'text', dataValueField: 'value', dataSource: { change: function(e) { var item = null; $('#'+options.field).data('kendoDropDownList').ul.children().each(function(idx, elem) { if($(elem).html() == options.model.rel_type) item = $(elem); }); console.log($(item).html());// does not select anything even tho console.log() proves that it is the correct element $('#'+options.field).data('kendoDropDownList').select($(item)); }, transport: { read: { url: '/relationdata/relation/relType', dataType: 'json' } } } }); }}Hi, We are using the following code but not able to populate the Grid. Our Json is in the form of string . the json structure is something like this. "d : [{"ID":"1","Name":"Umesh"}]"
$(document).ready(
function () {
$(
"#customergriddiv").kendoGrid
({
height: 400,
pageable: true,
scrollable: false,
sortable: true,
columns: [{ field: "ID", title: "ID" }, { field: "Name", title: "Name"}],
datasource: {
transport: {
read: {
type: "POST",
url: "GetJson.asmx/GetCustomers",
contentType: 'application/json; charset=utf-8',
dataType: "json"
}
},
schema: {
data:
"d"
}
, pageSize: 10
}
});
 });
<
div id="customergriddiv"></div>
<div data-role="view" data-title="Control Panel - Mobile" id="listtickets" data-init="listTicketsInit"> <h2>Tickets</h2> <p><a data-align="left" data-role="button" href="/support/newticket/">New ticket</a></p> <ul id="support_list" data-style="inset" > </ul> </div> <script id="support_list_template" type="text/x-kendo-template"> <li style="font-weight:normal" > <div style="float:left; width:20% "> #= DateCreated # </div> <div style="float:left; width:80% "> <a href="/support/view/#= ThreadID #">#= Subject #</a> </div> </li> </script><script> function listTicketsInit() { var ticketdata = <?=json_encode($tickets)?>; var dataSource = new kendo.data.DataSource({ data: ticketdata, dataType: "json", schema: { model: { id: "ThreadID", fields: { DateCreated: "DateCreated", ThreadID: "ThreadID", Subject: "Subject" } } } }); $("#support_list").kendoMobileListView({ dataSource: dataSource, pullToRefresh: true, appendOnRefresh: true, template: $("#support_list_template").text() });