or
<%
= Html.Telerik().TreeView()
.Name("TreeView")
.BindTo(Model, mappings =>
{
mappings.For<Employees>(binding => binding
.ItemDataBound((item, emp) =>
{
item.Text = emp.EmpName;
}));
})
%>
<div id="example" class="k-content"><table id="grid" style="float: left; position: relative"> <thead> <tr> <th width ="310px"data-field="FileName">File Name </th> <th width ="290px"data-field="ID">File Identifier </th> </tr> </thead> <tbody> @foreach (var item in Model) { <tr > <td class="idRank" > @item.FileName </td> <td class="idRank2" > @item.ID </td> </tr> } </tbody>$(document).ready(function () { LocationGridDataSource = new kendo.data.DataSource({ type: "json" ...); LocationGrid = ...}@using (Ajax.BeginForm("Bind", "Test", null, new AjaxOptions { OnSuccess = "BindOnSuccess" }, new { id = "BindForm" })){}function BindOnSuccess(context){ .... var location = LocationGridDataSource.get(context.id); var selection = LocationGrid.table.find('tr[data-uid="' + location.uid + '"]'); ....}The editor template contains a dropdowlist:columns.Bound(o => o.Product).EditorTemplateName("ProductItemDropDownList").ClientTemplate("#=ProductCode#");
@(Html.Kendo().DropDownList().Name("ProductCode").DataTextField("ProductCode").DataValueField("ProductId").DataSource(dataSource => dataSource.Read(read => read.Action("GetProducts", "Invoice")).ServerFiltering(true)))
The first problem is the cell remains empty after I select a product code. I expected to have there the code of the product. The second problem, I have no idea how to fill the rest of the cells representing product description, ... Thank you, Flaviu Boldea