Telerik UI for ASP。网络核心?下载30天免费试用

层次结构

Grid通过以分层方式显示其表数据,提供了用于可视化父记录和子记录之间关系的选项。

  • 要在Grid HtmlHelper中实现层次结构,请使用ClientDetailTemplateId ()方法,并根据父键字段值筛选子表中的记录。有关可运行的示例,请参阅演示如何在网格中使用层次结构

  • 要在Grid TagHelper中实现层次结构,请使用DetailInit函数初始化详细网格jQuery的剑道UI网格

@(Html.Kendo(). grid () . name ("grid") . columns (columns => {columns. viewmodel))Bound(e => e. firstname).Width(130);列。Bound(e => e. lastname).Width(130);列。Bound(e => e. country).Width(130);列。Bound(e => e. city).Width(110);列。Bound(e => e. title);}) .Sortable() .Pageable() .Scrollable() .ClientDetailTemplateId("template") .HtmlAttributes(new {style = "height:600px;" }) .DataSource(dataSource => dataSource .Ajax() .PageSize(6) .Read(read => read.Action("HierarchyBinding_Employees", "Grid")) ) ) 
 < DataSourceTagHelperType ="DataSourceTagHelperType. "自定义" Custom -type="odata" page-size="20">