or
oThis.productsDataSource = new kendo.data.DataSource ({ pageSize: 10, transport: { read: { url: crudServiceBaseUrl + "GetAll", dataType: "json" }, update: { url: crudServiceBaseUrl + "Post", contentType: "application/json", type: "POST", dataType: "json" }, destroy: { url: crudServiceBaseUrl + "Delete", contentType: "application/json", type: "DELETE", dataType: "json" }, create: { url: crudServiceBaseUrl + "New", contentType: "application/json", type: "POST", dataType: "json" }, parameterMap: function (data, type) { if (type !== "read" && data.models) { return kendo.stringify(data.models[0]); } } }, schema: { model: { id: "Id", fields: { Id: { editable: false, nullable: true }, Name: { validation: { required: true } }, ResourceCostBandId: { //type: "servicePath.SLF.solutionEngine.Model.EntityRef", fields: { Id: { editable: false }, Name: { editable: false } }, validation: { required: true } } } } }, batch: true });var grid = this.element.kendoGrid({ columns: [ { field: "Name", title: "Name", width: 200, validation: { required: true } }, { // Following binding not working but when I change it to following //field: "ResourceCostBandId" // It works but then it set the value on the ResourceCostBandId. I want it to be set on ResourceCostBandId.Id field: "ResourceCostBandId.Id", title: "Cost Band", width: 200, validation: { required: true }, template: "#= ResourceCostBandId.Name #", editor: function (container, options) { $('<input required data-text-field="Name" data-value-field="Id" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoDropDownList({ dataTextField: "Name", dataValueField: "Id", dataSource: oThis.controller.$scope.ResourceCostBands, index: 0 }); } }, { command: ["edit", "destroy"], title: " ", width: "172px" } ], toolbar: ["create"], pageable: { "pageSize": 5, "refresh": true, "pageSizes": true }, autoBind: true, dataSource: oThis.productsDataSource, resizable: true, editable: 'inline', selectable: true, });{ modal : true, animation : false}columns: [{ field: "items__item", title: "Item Id", width: 25 }, { field: "items__name", title: "Item Name", width: 125 }, { field: "items__average_historic_price", title: "Avg Hist Price", width: 25 }, { field: "items__price_currency", title: "Currency", width: 25 }, { field: "items__quantity", title: "Quantity", width: 25 }, { field: "attribute79_value", title: "Major Customer?", width: 125 }, { field: "attribute84_value", title: "Orig City", width: 75 }, { field: "attribute85_value", title: "Orig State", width: 25 }, { field: "attribute89_value", title: "Dest City", width: 75 }, { field: "attribute90_value", title: "Dest State", width: 25 }]<script id="template" type="text/kendo-tmpl"> @(Html.Kendo().Grid<Ebook2Web.PricingGridSvc.PricingGridDetail >() .Name("PricingGridDetail_#PricingGridId#") .Columns(columns => { columns.Bound(d => d.PricingGridDetailId); columns.Bound(d => d.StartPrice); columns.Bound(d => d.EndPrice); columns.Bound(d => d.Price); columns.Bound(d => d.TierId); columns.Bound(d => d.ModifiedBy); columns.Bound(d => d.ModifiedDate); }) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("CreatePricingGridDetail", "PricingGrid", new { pricingGridId = "#=PricingGridId#" })) ) .ToClientTemplate() )</script>public ActionResult CreatePricingGridDetail(int pricingGridId, [DataSourceRequest] DataSourceRequest request) { var pricingGrid = PricingGrids.SingleOrDefault(x => x.PricingGridId == pricingGridId); return Json(pricingGrid.Details.ToDataSourceResult(request)); }