or
<%: Html.Kendo().Grid<Thread.Data.Models.Model>() .Name("Grid") .Columns(columns => { columns.Command(command => { command.Edit(); command.Destroy(); }).Width(190).HtmlAttributes(new { style = "text-align:center;" }); columns.Bound(m => m.ModelID).Hidden(); columns.Bound(m => m.ModelName).Width(140); columns.Bound(m => m.Company).Width(160).ClientTemplate("#= (typeof Company === 'undefined') ? ' ' : Company.CompanyName #").EditorTemplateName("CompanyDropDownList"); columns.Bound(m => m.Job).Width(160).ClientTemplate("#= (typeof Job === 'undefined') ? ' ' : Job.JobName #").EditorTemplateName("JobDropDownList"); columns.Bound(m => m.TempModelNumberFlag).Width(100); columns.Bound(m => m.IsCarryOver).Width(100); columns.Bound(m => m.HoursEstimate).Width(120).ClientTemplate("#= (HoursEstimate === null) ? ' ' : HoursEstimate #"); columns.Bound(m => m.Description).Width(140).ClientTemplate("#= (Description === 'null') ? ' ' : Description #"); columns.Bound(m => m.RetailIntroDate).Width(140).Format("{0:d}");
}) .ClientDetailTemplateId("jobDetailTemplate") .ToolBar(toolBar => { toolBar.Create(); }) .Editable(editable => editable.Mode(Kendo.Mvc.UI.GridEditMode.InLine)) .HtmlAttributes(new { style = "height: 675px" }) .Pageable() .Sortable() .Scrollable() .Selectable() .Filterable() .Events(events => events.DataBound("dataBound")) .DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .PageSize(15) .Events(events => events.Error("error_handler")) .Model(model => { model.Id(j => j.ModelID); model.Field(j => j.ModelID).Editable(false); model.Field(j => j.AlertCount).Editable(false); model.Field(j => j.ArticleCount).Editable(false); model.Field(j => j.DocumentCount).Editable(false); }) .Read(read => read.Action("Model_Read", "Models")) .Update(update => update.Action("Model_Save", "Models")) .Create(create => create.Action("Model_Save", "Models")) .Destroy(destroy => destroy.Action("Model_Destroy", "Models")) ) %>Data[Object { ModelID=6, ModelName="Test IV", ModelNumber="DSAF", more...}] Total 1AggregateResults nullErrors nullvar dsInvestments2 = new kendo.data.DataSource({ transport: { read: "/api/investments", create: { url: "/api/investments", type: "POST" }, update: { url: function (o) { return "/api/investments/" + o.ID; }, type: "PUT" }, destroy: { url: function (o) { return "/api/investments/" + o.ID; }, type: "DELETE" } }, group: [ { field: "AccountTypeName", dir: "desc" }, { field: "ProductName", dir: "desc" } ], schema: { model: { id: "ID", fields: { ID: { editable: false, nullable: false }, AccountTypeID: { editable: true }, AccountTypeName: { editable: false }, ProductID: { validation: { required: true } }, ProductName: { editable: false }, Name: { validation: { required: true } }, Commission: { validation: { required: true }, type: "number" } } } }});$("#investments").kendoGrid({ sortable: true, scrollable: true, toolbar: [{ name: "create", text: "New" }], dataSource: dsInvestments2, columns: [ { field: "AccountTypeID", title: "Account Type", template: "#=AccountTypeName#", editor: accountTypeEditor, hidden: true }, { field: "AccountTypeName", title: "Account Type", hidden: true, groupHeaderTemplate: "${ value }" }, { field: "ProductID", title: "Product", editor: productsEditor, template: "#=ProductName#", hidden: true }, { field: "ProductName", title: "Product", hidden: true, groupHeaderTemplate: "${ value }" }, { field: "Name", title: "Investment" }, { field: "Commission", title: "Commission", format: "{0:p0}", width: 100, type: "number", step: 0.01 }, { command: ["edit", "destroy"], title: " ", width: 200 }], editable: "inline"});$("#grid").kendoGrid({ dataSource: dS, columns: [{ title: "Copropriété", field: "Lib", template: "<a href='HistoriqueCompte.html'> ${Lib} <a/> " }, { title: "Agence", field: "RaisonSocialeLicence" }, { title: "Solde", field: "Solde" }] });"<a href='HistoriqueCompte.html?CodeCopro=${CodeCopro}&IndGmcCopro=${IndGmcCopro}&IdAgence=${IdAgence}' >${Lib}<a/> " }