or
$("#chart").kendoChart({ theme: $(document).data("kendoSkin") || "default", title: { text: "Break-up of Spain Electricity Production for 2008" }, legend: { position: "bottom", labels: { template: "#= text # (#= value #%)" } },<div class="chart-wrapper"> @(Html.Kendo().Chart() .Name("Chart1") .Transitions(false) .Title(d.graph_name) .Series(series => { foreach (www.Models.ChartDataItem s in d.chart_items) { if (s.type == "area") { series.Area(s.name) .Aggregate(ChartSeriesAggregate.Avg); } if (s.type == "line") { series.Line(s.name) .Aggregate(ChartSeriesAggregate.Avg); } } })public ActionResult Scans_Read([DataSourceRequest] DataSourceRequest request){ return Json(GetScans().ToDataSourceResult(request));}private static IEnumerable<ScanModel> GetScans() { var ec = new entityContext(); return ec.tScan.Select(scanmodel => new ScanModel { scanId = scanmodel.scanId, description = scanmodel.description, directoryPath = scanmodel.directoryPath }); }public class ScanModel { [ScaffoldColumn(false)] public int scanId { get; set; } [Required] [DisplayName("description")] public string description { get; set; } [Required] [DisplayName("directoryPath")] public string directoryPath { get; set; } }@model IEnumerable<ns.Models.ScanModel><script type="text/x-kendo-tmpl" id="template"> <div class="scanmodel"> <h3>#:description#</h3> </div></script>@(Html.Kendo().ListView<ns.Models.ScanModel>(Model) .Name("listView") .TagName("div") .ClientTemplateId("template") .DataSource(dataSource => { dataSource.Read(read => read.Action("Scans_Read", "CustomerPortal")); }))@(Html.Kendo().Grid<MyParentGridModel>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.Id).Groupable(false).Width(50); columns.Bound(p => p.Name); columns.Bound(p => p.ShortDescription); columns.Bound(p => p.LinkText); }) .Sortable() .Pageable() .Scrollable(scr=>scr.Height(500)) .ClientDetailTemplateId("template") .HtmlAttributes(new { style = "height:430px;" }) .DataSource(dataSource => dataSource .Ajax() .PageSize(20) .Read(read => read.Action("ParentModel_Read", "ControllerName")) ) )<script id="template" type="text/kendo-tmpl"> @(Html.Kendo().Grid<ChildGridModel>() .Name("Grid_#=Id#") .Columns(columns => { columns.Bound(o => o.PageNumber).Width(50); columns.Bound(o => o.ChapterTitle).Width(150); columns.Bound(o => o.BodyContent); columns.Template(@<text> @Html.ActionLink("edit", "ControllerAction", "ControllerName", new { id = @item.Id }, new {@class = "k-button" }) </text>) .ClientTemplate(@Html.ActionLink("edit", "ControllerAction", "ControllerName", new { ID = "#=Id#" }, new { @class = "k-button" }).ToHtmlString()); }) .DataSource(dataSource => dataSource .Ajax() .PageSize(10) .Read(read => read.Action("ChildModel_Read", "ControllerName", new { parentModelId = "#=Id#" })) ) .Pageable() .Sortable() .ToClientTemplate() )</script><script type="text/javascript"> function onChange(e) { $.ajax({ url: "/Nav/MontaMenu/", dataType: "json", cache: false, type: 'GET', data: { nomePastaSelecionada: this.text(), caminhoPastaSelecionada: this.value() }, success: function (result) { $('#treeview').kendoTreeView(); var tvProjeto = $('#treeview').getKendoTreeView(); tvProjeto.destroy(); var dataSource = new kendo.data.DataSource({ data: result }); dataSource.fetch(function () { tvProjeto.setDataSource({ data: dataSource }); }); } }); }</script>