or
@(Html.Kendo().Scheduler<SchedulerViewModel>() .Name("scheduler") .Views(views => { views.DayView(); views.WeekView(); views.MonthView(monthView => monthView.Selected(true)); }) .Resources(resource => { resource.Add(r => r.RegionIds) .Name("RegionsResource") .Title("RegionsRes") .DataTextField("RegionName") .DataValueField("RegionId") .Multiple(true) .DataSource(source => { source.Read(read => { read.Action("RegionDropDownList", "DropDownList"); }); }); resource.Add(v => v.VenueId) .Name("VenuesResource") .Title("VenueRes") .DataTextField("VenueName") .DataValueField("VenueId") .BindTo((IEnumerable<VenueViewModel_DDL>)ViewData["Venues"]); } ) .DataSource(d => d.Model(m => { m.Id(f => f.EventId); m.Field(f => f.Title).DefaultValue("No title"); m.RecurrenceId(f => f.RecurrenceID); m.Field(f => f.IsAllDay).DefaultValue(false); }) .Read("Read", "Scheduler") .Create("Create", "Scheduler") .Destroy("Destroy", "Scheduler") .Update("Update", "Scheduler") .Events(e => e.Error("error_handler")) ) .Editable(true) )@(Html.Kendo().Grid<Umki2.Areas.Wlb.ViewModels.VmWlbWeldLogBook>() .Name("grid") .Columns(columns => { columns.Bound(c => c.JointNo).Width(140); columns.Bound(c => c.WlbJointLocation).Width(190); columns.Command(command => command.Custom("FitUp").Click("showDetails")); }) .HtmlAttributes(new { style = "height: 380px;" }) .Scrollable() .Groupable() .Sortable() .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("Grid_Read", "WlbExplorer")) ))@(Html.Kendo().Window().Name("Details") .Title("Customer Details") .Visible(false) .Modal(true) .Draggable(true) .Width(300))<script type="text/x-kendo-template" id="template"> <div id="details-container"> <h2>#= JointNo # #= JointNo #</h2> <em>#= WlbJointLocation #</em> <dl> <dt>City: #= WlbJointLocation #</dt> <dt>Address: #= WlbJointLocation #</dt> </dl> </div></script><script type="text/javascript"> var detailsTemplate = kendo.template($("#template").html()); function showDetails(e) { e.preventDefault(); var dataItem = this.dataItem($(e.currentTarget).closest("tr")); var wnd = $("#Details").data("kendoWindow"); wnd.content(detailsTemplate(dataItem)); wnd.center().open(); }</script>@(Html.Kendo().TreeView() .Name("fao") .HtmlAttributes(new {@class="fixed-height" }) .DataTextField("Text") .TemplateId("treeview-item-template") .DataSource(ds => ds .Read(r => r .Action("_ModuleData", "Home") ) .Model(m => m .Children("Items") .HasChildren("HasChildren") ) ))<script id="treeview-item-template" type="text/kendo-ui-template"> #= item.Text #<input type='hidden' class='hidden-data' data-fal='#= item.Fal#' data-uid='#=item.uid#'/></script>function doSomething(e){ for(n=0; n<e.node.nodes.length; n++) { doSomethingElse(e.node.nodes[n]); }}@model IEnumerable<Umki2.Areas.Wlb.ViewModels.VmWlbWeldLogBook>
@(Html.Kendo().Grid(Model) .Name("grid") .DataSource(ds => ds .Ajax() .PageSize(20) .Model(model => { model.Id(a => a.Id); model.Field(a => a.Id).Editable(false); model.Field(a => a.PID).Editable(false); }) .Create(create => create.Action("Grid_Create", "WlbWeldLogBook")) .Read(read => read.Action("Grid_Read", "WlbWeldLogBook")) .Update(update => update.Action("Grid_Update", "WlbWeldLogBook")) .Destroy(destroy => destroy.Action("Grid_Destroy", "WlbWeldLogBook")) ) .Columns(p => { p.Command(commands => { commands.Edit(); commands.Destroy(); }).Title("").Width(180).Locked(); p.Bound(c => c.WlbLine).Width(160); p.ForeignKey(c => c.WlbSpoolId, (System.Collections.IEnumerable)ViewData["WlbSpoolId"], "Id", "SpoolNo").Width(110).Locked(true).Lockable(false); p.Bound(c => c.PID).Width(200); p.Bound(c => c.JointNo).Width(110).Locked(true).Lockable(false); p.Bound(c => c.WeldingProcess).Width(200); p.Bound(c => c.WlbJointLocation).Width(200); p.Bound(c => c.WlbJointType).Width(200); p.ForeignKey(c => c.WrhIdentity1Id, (System.Collections.IEnumerable)ViewData["WrhIdentityList"], "Id", "IdentityNo").Width(110); p.ForeignKey(c => c.WrhIdentity2Id, (System.Collections.IEnumerable)ViewData["WrhIdentityList"], "Id", "IdentityNo").Width(110); }) .ToolBar(toolbar => { toolbar.Create(); toolbar.Excel(); }) .Editable(editable => editable.Mode(GridEditMode.InLine)) .Pageable() .Sortable() .Groupable() .Filterable(ftb => ftb.Mode(GridFilterMode.Menu)) .Resizable(resizable => resizable.Columns(true)) .Scrollable(scrollable => scrollable.Height(430)) .Reorderable(reorderable => reorderable.Columns(true)) .ColumnMenu() .Excel(excel => excel .FileName("LineList_" + System.DateTime.Now + ".xlsx") .Filterable(true) .ProxyURL(Url.Action("Excel_Export_Save", "Grid")) ) )@model Umki2.Areas.Wlb.Models.WlbLine@(Html.Kendo().DropDownListFor(m => m) .AutoBind(false) .OptionLabel("Select Line...") .DataTextField("LineNo") .DataValueField("Id") .DataSource(dataSource => { dataSource.Read(read => read.Action("GetLines", "WlbWeldLogBook", new { area = "Wlb" })) .ServerFiltering(true); }))@Html.ValidationMessageFor(m => m)public JsonResult GetLines() { return Json( db.WlbLine.Select(x => new { Id = x.Id, LineNo = x.LineNo }), JsonRequestBehavior.AllowGet); } public ActionResult Index() { ViewBag.WlbSpoolId = db.WlbSpool.ToList(); ViewBag.WrhIdentityList = db.WrhIdentityList.ToList(); return View(); } public ActionResult Grid_Read([DataSourceRequest]DataSourceRequest request) { IQueryable<WlbJoint> WlbJoint = db.WlbJoint; var model = from o in db.WlbJoint select new VmWlbWeldLogBook { Id = o.Id, JointNo = o.JointNo, WeldingProcess = o.WeldingProcess, WlbJointType = o.WlbJointType, WlbJointLocation = o.WlbJointLocation, WlbSpoolId = o.WlbSpoolId, WrhIdentity1Id = o.WrhIdentity1Id, WrhIdentity2Id = o.WrhIdentity2Id, WlbLineId = o.WlbSpool.WlbIsometric.WlbLineId, PID = o.WlbSpool.WlbIsometric.WlbLine.PID }; DataSourceResult result = model.ToDataSourceResult(request); return Json(result); }@(Html.Kendo().LinearGauge() .Name("progressGauge") .Pointer(pointer => pointer .Value(2.5) .Shape(GaugeLinearPointerShape.Arrow) ) .Scale(scale => scale .MajorUnit(1) .MinorUnit(0.5) .Max(4) .Vertical(false) .Ranges(ranges => { ranges.Add().From(0).To(1).Color("#dbe5f1"); ranges.Add().From(1).To(2).Color("#cadbf0"); ranges.Add().From(2).To(3).Color("#b2c9e5"); ranges.Add().From(3).To(4).Color("#94b6df"); }) ) ).Labels(x=>x .Template("#= 't' #")).Labels(x=>x .Template("# 'function(r){ return 't'} #"))Uncaught Error: Invalid template:'# 'function(r){ return 't'} #' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput=''; 'function(r){ return 't'} ;$kendoOutput+='';}return $kendoOutput;'.Labels(x=>x .Template("#= 'function(r){ return 't'} #"))Uncaught Error: Invalid template:'#= 'function(r){ return 't'} #' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput=''+( 'function(r){ return 't'} )+'';}return $kendoOutput;'