or
{ field: "Application", title: "Owned By", width: "120px", editor: applicationDropDownEditor, template: "#=Application.ApplicationName#" }var applicationDataSource = { type: "odata", transport: { read: { url: "odata/Sys_Application", dataType: "json", type: "GET" }, }, schema: { data: "value", total: "count" }, } function applicationDropDownEditor(container, options) { $('<input required data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoDropDownList({ autoBind: false, dataTextField: "ApplicationName", dataValueField: "ApplicationRef", dataSource: applicationDataSource }); }// POST: odata/Entities public async Task<IHttpActionResult> Post(Entity entity) { if (!ModelState.IsValid) { return BadRequest(ModelState); } db.Entry(entity.Application).State = EntityState.Unchanged; db.Entities.Add(entity); await db.SaveChangesAsync(); return Created(entity); }schema: { data: function (data) { if (data.value) { return data.value; } delete data["odata.metadata"]; return [data]; }
$().ready(function () { var ds = [/*snip*/]; $("#treemap").kendoTreeMap({ dataSource: { data: ds, schema: { model: { children: "items" } } }, valueField: "value", textField: "name" }); function dataBund(e) { console.log("DataBound"); } var treemap = $("#treemap").getKendoTreeMap(); treemap.bind("dataBound", dataBund);});