or
@(Html.Kendo().TreeView() .Name("treeviewTierQueue") .DataTextField("Text") .DataSource(dataSource => dataSource .Read(read => read.Action("GetTierQueueList", "Enum")) ))public JsonResult GetTierQueueList(string level){ var items = new List<NestedSelectListItem>() { new NestedSelectListItem {Id = "0", Text = "All Analysts"}, new NestedSelectListItem {Id = "1", Text = "All Groups"}, new NestedSelectListItem { Id = "2", Text = "Service Desk", hasChildren=true, Items = new List<NestedSelectListItem> () { new NestedSelectListItem {Id = "2a", Text = "2nd Level"}, new NestedSelectListItem {Id = "2b", Text = "2nd Level B"}, new NestedSelectListItem { Id = "2c", Text = "2nd Level C", hasChildren= true, Items = new List<NestedSelectListItem> () { new NestedSelectListItem {Id = "3a", Text = "3rd Level"}, new NestedSelectListItem {Id = "3b", Text = "3rd Level B"} } } } } }; if (!String.IsNullOrEmpty(level)) { var filtered = items.First(i => i.Id == level).Items; items = filtered; } return Json(items.AsEnumerable(), JsonRequestBehavior.AllowGet);}@(Html.Kendo().ListView<CorrectiveActionItemModel>() .Name("corrective-action-items-listview") .TagName("div") .ClientTemplateId("corrective-action-item-view-template") .DataSource(dataSource => dataSource .Model(model => { model.Id("CorrectiveActionItemID"); model.Field(f => f.CorrectiveActionPlanID).DefaultValue(this.Model.CorrectiveActionPlanID); model.Field(f => f.CorrectiveActionItemType); }) .PageSize(1) .Create(create => create.Action("Item_Create", "CorrectiveActionItem", new { this.Model.CorrectiveActionPlanID })) .Read(read => read.Action("Items_Read", "CorrectiveActionItem", new { this.Model.CorrectiveActionPlanID })) .Update(update => update.Action("Item_Update", "CorrectiveActionItem")) .Destroy(destroy => destroy.Action("Item_Destroy", "CorrectiveActionItem")) ) .Pageable() .Editable())@using Steton.Web.MVC.Model@model CorrectiveActionItemModel<div class="corrective-action-item-display"> <div class="edit-buttons"> <a class="k-button k-button-icontext k-update-button" href="\\#"><span class="k-icon k-update"></span></a> <a class="k-button k-button-icontext k-cancel-button" href="\\#"><span class="k-icon k-cancel"></span></a> </div> @Html.HiddenFor(m => m.CorrectiveActionItemID) @Html.HiddenFor(m => m.CorrectiveActionPlanID) <div class="action-section"> @Html.LabelFor(m => m.DirectiveText) @Html.TextAreaFor(m => m.DirectiveText) </div> <div class="action-section"> @Html.LabelFor(m => m.ActionTakenText) @Html.TextAreaFor(m => m.ActionTakenText) </div> <div class="action-section"> <div style="clear:both"> <div class="action-sub-edit-section"> <div> @Html.LabelFor(m => m.DueDate) @(Html.Kendo().DatePicker() .Name("DueDate") .Value("12/31/2013")) </div> <div> @Html.LabelFor(m => m.IsCompleted) @Html.CheckBoxFor(m => m.IsCompleted) </div> </div> <div class="action-sub-edit-section"> <div> @Html.LabelFor(m => m.CorrectiveActionItemType) @Html.EditorFor(m => m.CorrectiveActionItemType) </div> </div> </div> </div></div>@using System.Collections@(Html.Kendo().DropDownList() .Name("CorrectiveActionItemType") .DataTextField("TypeName") .DataValueField("CorrectiveActionItemTypeID") .DataSource(read => read.Read("Types","CorrectiveActionItem", new { correctiveActionPlanID = "#=CorrectiveActionPlanID#" }))).Read(read => read.Action("Containers_Read", "ContainerAdmin")) .Create(update => update.Action("Containers_Create", "ContainerAdmin")) .Update(update => update.Action("Containers_Update", "ContainerAdmin")) .Destroy(update => update.Action("Containers_Delete", "ContainerAdmin"))public ActionResult Containers_Read([DataSourceRequest] DataSourceRequest request) { return Json(_repository.GetAllAssetTakeOnContainers().ToDataSourceResult(request)); }public List<AssetTakeOnContainer> GetAllAssetTakeOnContainers() { using (var context = new AssetTakeOnContext()) { context.Configuration.LazyLoadingEnabled = false; return context.AssetTakeOnContainers.Include("TakeOns").Include("LocationLevel1").Include("LocationLevel2").Include("LocationLevel3").Include("CostCntrLevel1").Include("CostCntrLevel2").Include("CostCntrLevel3").Include("Contact").Include("RoomType").Where(c => c.IsDeleted == false).ToList(); } }[AcceptVerbs(HttpVerbs.Post)] public ActionResult Containers_Update([DataSourceRequest] DataSourceRequest request, AssetTakeOnContainer container) { _repository.UpdateAssetTakeOnContainer(container); return Json(ModelState.ToDataSourceResult()); }<script id="matchedTrainTemplate" type="text/x-kendo-template"> @(Html.Kendo().Grid<CNX.Domain.Entities.MatchedT94EDI417Railcar>() .Name("MatchingEDI417s_#=Id#") .Editable(editable => editable.Mode(GridEditMode.PopUp).Window(w => w.Modal(true) .Width(500) .Height(510) .Resizable(x => x.Enabled(true)) //.Events(x => x.Close("ClosingEditWindow")) ) ) .Columns(columns => { columns.Bound(o => o.MATCHING_GUID).Visible(false); columns.Bound(o => o.N7_GUID).Visible(false); columns.Bound(o => o.EDI_OWNER_CODE).Width("50"); columns.Bound(o => o.T94_OWNER_CODE).Width("50"); columns.Bound(o => o.EDI_EQUIPMENT_NUMBER).Width("75"); columns.Bound(o => o.T94_EQUIPMENT_NUMBER).Width("75"); columns.Bound(o => o.EDI_GROSS_WEIGHT).Width("75"); columns.Bound(o => o.EDI_TARE_WEIGHT).Width("75"); columns.Bound(o => o.T94_SEQUENCE_NUMBER); columns.Command(commands => { commands.Edit(); }).Title("Edit Railcar").Width("50"); columns.Bound(o => o.RREGUID).Visible(false); columns.Bound(o => o.EDI_417_GUID).Visible(false); columns.Bound(o => o.HeaderGuid).Visible(false); }) .DataSource(dataSource => dataSource.Ajax() .PageSize(10) .Model(model => model.Id(o => o.MATCHING_GUID)) .Read(read => read.Action("MatchedEDI417sDetail", "MenuEDI", new { matchingGuid = "#=Id#" }).Type(HttpVerbs.Post)) .Update(update => update.Action("MatchedEDI417sUpdate", "MenuEDI" , Model).Type(HttpVerbs.Post)) ) .Pageable() .Sortable() .Filterable() .Events( events => events.Save("detailSave")) .ToClientTemplate() ); </script><script> function detailSave() { alert('Save Event'); this.dataSource.read(); }</script>[HttpPost] public ActionResult MatchedEDI417sUpdate(MatchedT94EDI417Railcar railCar, [DataSourceRequest] DataSourceRequest request) { TempData["role"] = GetRole(); matchedT94EDI417RailCarRepository.Save(railCar); return Json(matchedT94EDI417RailCarRepository.RailCarsMatchedT94EDI417(railCar.MATCHING_GUID).ToDataSourceResult(request)); }