or
​columns: [ { field: "name", template: "# if (name.substr(0, 4) == 'Jane') { #" + "<span style='color: lightgray'> #: name # </span>" + "# } else { #" + "#: name #" + "# } #" }],field: "MarketngEngnrID",values: theMarketers, // a JSON array containing key-value pairs to show the text rather than the value@(Html.Kendo().Grid<Application.Models.OrgHtmlContentViewModel>() .Name("ContentGrid") .Columns(columns => { columns.Bound(c => c.OrgHtmlContentTypeName).Width(150).Title("Content Type"); columns.Bound(c => c.HtmlContent).Width(600).Title("Html Content").Encoded(false); columns.Command(command => { command.Edit(); }).Width(100); }) .HtmlAttributes(new { style = "height: 600px;" }) .Scrollable() .Sortable() //.Editable(editable => editable.Mode(GridEditMode.PopUp)) .Editable(editable => { editable.Mode(GridEditMode.PopUp); editable.TemplateName("OrgHtmlContentEditor").Window(w => w.Title("Org Html Content").Width(760)); }) .DataSource(dataSource => dataSource .Ajax() .Events(events => events.Error("error_handler")) .Model(model => model.Id(c => c.OrgHtmlContentId)) .Read(read => read.Action("OrgHtmlContent_Read", "OrgHtmlContents", new { id = Model.OrganizationId })) .Update(update => update.Action("OrgHtmlContent_Update", "OrgHtmlContents")) ))@model Application.Models.OrgHtmlContentViewModel<div style="padding: 10px;"> <h6>@Html.DisplayFor(m => m.OrgHtmlContentTypeName)</h6> @(Html.Kendo().EditorFor(c => c.HtmlContent) .Name("contentEditor") .HtmlAttributes(new { style = "width: 740px;height:440px" }) )</div>@(Html.Kendo().ListView<SchedulerMVC.Models.EmployeeViewModel>() .Name("listview-context-menu") .TagName("div") .ClientTemplateId("template") .DataSource(dataSource => { dataSource.Read(read => read.Action("Data", "ContextMenu").Type(HttpVerbs.Get)); dataSource.PageSize(5); }) .Selectable() .Events(e => { e.DataBound("setItemDoubleClickEvent"); }))@(Html.Kendo().ContextMenu() .Name("context-menu") .Target("#listview-context-menu") .Orientation(ContextMenuOrientation.Vertical) .Items(items => { items.Add().Text("MenuItem").SpriteCssClasses("k-icon k-i-tick"); }) .Events(events => events.Select("selectContext")))// ListView DoubleClickfunction setItemDoubleClickEvent() { var items = $(".product"); items.dblclick(function (e) { var listView = $("#listview-context-menu").data("kendoListView"); var contextMenu = $("#context-menu").data("kendoContextMenu"); var uid = $(this).data("uid"); var item = listView.dataSource.getByUid(uid); contextMenu.open(e.clientX, e.clientY); });}