大佬教程收集整理的这篇文章主要介绍了asp.net-mvc – Kendo UI Grid一次只扩展一行,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@(Html.Kendo().Grid<Mymodel>() .Name("MyGrid") .ClientDetailTemplatEID("myTemplate") .columns(columns => { columns.bound(b => b.CodE); columns.bound(b => b.Name); columns.bound(b => b.Description); ... columns.Command(cmd => { cmd.Edit(); cmd.Destroy(); }); }) .ToolBar(toolbar => toolbar.Create()) .Editable(editable => editable.Mode(GridEditMode.InLinE)) .Datasource(datasource => datasource .Ajax() .Model(model => model.Id(a => a.Id)) .Create(create => create.Action("Create","Sysmaint",new { id = Model.ProjectId })) .Read(read => read.action("Read",new { projectId = Model.ProjectId })) .update(update => update.Action("update","Sysmaint")) .Destroy(destroy => destroy.Action("Destroy","Sysmaint")) ) ) <script id="myTemplate" type="text/kendo-tmpl"> @(Html.Kendo().TabStrip() .Name("TabStrip_#=Id#") .SELEctedIndex(0) .Items(items => { items.Add().Text("A").LoadContentFrom("MyPartialA",new { id = "#=Id#" }); items.Add().Text("B").LoadContentFrom("MyPartialB",new { id = "#=Id#" }); }) .ToClientTemplate() ) </script>
... .update(update => update.Action("update","Sysmaint")) ) .Events(events => events.DetailExpand("detailExpand")) ) <script type="text/javascript"> var expandedRow; function detailExpand(E) { // Only one open at a time if (expandedRow != null && expandedRow[0] != e.masterRow[0]) { var grid = $('#MyGrid').data('kendoGrid'); grid.collapseRow(expandedRow); } expandedRow = e.masterRow; } </script>
我希望这有助于某人.
以上是大佬教程为你收集整理的asp.net-mvc – Kendo UI Grid一次只扩展一行全部内容,希望文章能够帮你解决asp.net-mvc – Kendo UI Grid一次只扩展一行所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。