or
01.@(Html.Kendo().Grid<Receipt>()02. .Name("GridReceipts")03. .Columns(columns => {04. columns.Bound(o => o.Id);05. columns.Bound(o => o.Supplier);06. columns.Bound(o => o.Status);07. columns.Command(c => {08. c.Edit().Text(" ");09. c.Destroy().Text(" ");10. });11. })12. .DataSource(d => d13. .WebApi()14. .Model(m => m.Id(o => o.Id))15. .Create(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts" })))16. .Read(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts" })))17. .Update(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts", id = "{0}" })))18. .Destroy(c => c.Url(Url.HttpRouteUrl("DefaultApi", new { controller = "Receipts", id = "{0}" })))19. )20. .ToolBar(toolbar => toolbar.Create())21. .Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("Receipt"))22. .Deferred()23.)01.@model Receipt02. 03.<div class="k-edit-label">@Html.LabelFor(m => m.Supplier)</div>04. <div class="k-edit-field">05. @(Html.Kendo().AutoCompleteFor(m => m.Supplier)06. .Name("ACSupplier")07. .DataSource(s => {08. s.Read("Autocomplete", "Suppliers");09. })10. .DataTextField("Name")11. .MinLength(2)12. )13.</div>01.var statsByUserDataChange = function(e) {02. var chart = $("#x-by-user").data("kendoChart");03. 04. if( chart.dataSource.page() !== e.sender.page() ) {05. chart.dataSource.page(e.sender.page());06. }07. 08. if( chart.dataSource.sort() !== e.sender.sort() ) {09. chart.dataSource.sort(e.sender.sort());10. }11. 12. chart.refresh();13.};<% this.Html.Kendo().Grid<EditablePlanejamentoDescarga>() .Name("GridPlanejamento") .Columns(columns => { columns.Bound(c => c.TransportadorNome) .Width(500) .HeaderHtmlAttributes(new { style = "text-align: center; font-weight: bold" }) .ClientFooterTemplate(" TOTAIS :") .FooterHtmlAttributes(new { style = "background-color:lightgray; text-align: right; font-weight :bold" }); columns.Bound(c => c.Domingo) .Width(175) .HtmlAttributes(new { style = "text-align: center" }) .HeaderHtmlAttributes(new { style = "text-align: center; font-weight: bold" }) .ClientTemplate("#= Domingo.QuantidadeFardos >0 ? Domingo.QuantidadeFardos :'' #") .ClientFooterTemplate("#=sum#") .FooterHtmlAttributes(new { style = "background-color:lightgray; text-align: right; font-weight :bold" }); columns.Bound(c => c.SegundaFeira) .Width(175) .HtmlAttributes(new { style = "text-align: center" }) .HeaderHtmlAttributes(new { style = "text-align: center; font-weight: bold" }) .ClientTemplate("#= SegundaFeira.QuantidadeFardos >0 ? SegundaFeira.QuantidadeFardos :'' #") .ClientFooterTemplate("#=sum#") .FooterHtmlAttributes(new { style = "background-color:lightgray; text-align: right; font-weight :bold" }); columns.Bound(c => c.TotalTransportador) .HtmlAttributes(new { style = "background-color:lightgray; text-align: right; font-weight :bold" }) .HeaderHtmlAttributes(new { style = "text-align: center; font-weight: bold" }) .ClientTemplate("#= TransportadorNome == '' ? '' : TotalTransportador #") .ClientFooterTemplate("#=sum#") .FooterHtmlAttributes(new { id = "footerTotal", style = "background-color:lightgray; text-align: right; font-weight :bold" }); }) .DataSource(dataSource => { dataSource.Ajax().Batch(true).ServerOperation(false); dataSource.Ajax().Model(m => { m.Id(i => i.TransportadorNome); m.Field(f => f.TransportadorNome).Editable(false); m.Field(f => f.TotalTransportador).Editable(false); }); dataSource.Ajax().Aggregates(agg => { agg.Add(a => a.Domingo.QuantidadeFardos).Sum(); agg.Add(a => a.SegundaFeira.QuantidadeFardos).Sum(); agg.Add(a => a.TotalTransportador).Sum(); }); }) .ToolBar(toolbar => { toolbar.Save(); }) .Editable(e => e.Mode(Kendo.Mvc.UI.GridEditMode.InCell)) .Navigatable(n => n.Enabled(true)) .Events(e => e.DataBound("onDataBound").Edit("onEdit").Save("onSave")) .Render(); %>