@(Html.Telerik().Grid<Com.Hospira.Sox.Models.NodeViewModel>() .HtmlAttributes(new { style = "width: 920px; margin-left:0px; margin-top:35px" }) // PROCESSES: .Name("Processes") .Columns(columns => { columns.Bound(p => p.description).Title("Process"); columns.Bound(p => p.owner).Title("Global Process Owner"); }) // RISK AREAS: .DetailView(riskareasDetailView => riskareasDetailView.ClientTemplate( Html.Telerik().Grid(Model) .Name("RiskAreas_<#= id #>") .Columns(columns => columns.Bound(ra => ra.description).Title("Subprocess")) .Footer(false) // RISKS .DetailView(risksDetailView => risksDetailView.ClientTemplate( Html.Telerik().Grid(Model) .Name("Risks_<#= id #>") .Columns(columns => { columns.Bound(r => r.code).Width(100).Title("Risk ID"); columns.Bound(r => r.description).Title("Risk Description"); }) .Footer(false) // OBJECTIVES .DetailView(objectivesDetailView => objectivesDetailView.ClientTemplate( Html.Telerik().Grid(Model) .Name("Objectives_<#= id #>") .Columns(columns => { columns.Bound(o => o.code).Width(100).Title("Obj. ID"); columns.Bound(o => o.description).Title("Control Objective Description"); }) .Footer(false) //CONTROLS .DetailView(controlsDetailView => controlsDetailView.ClientTemplate( Html.Telerik().Grid(Model) .Name("Controls_<#= id #>") .Columns(columns => { columns.Bound(o => o.code).Width(100).Title("Ctrl ID"); columns.Bound(o => o.description).Title("Control Description"); }) .Footer(false) // entities subscribed to the control .DetailView(subscribedDetailView => subscribedDetailView.ClientTemplate( Html.Telerik().Grid(Model) .Name("Entities_<#= id #>") .Columns(columns => { columns.Bound(o => o.description).Width(100).Title("EntityName"); columns.Bound(o => o.owner2).Title("Entity Head of Accounting"); columns.Bound(o => o.owner3).Title("Entity Head of Finance"); }) .Footer(false) // Bind the Enitties here using calling the Master Control // _EntitiesForControlHierarchyAjax created for ticket 123 .DataBinding(dataBinding => dataBinding.Ajax() .Select("_EntitiesForControlHierarchyAjax", "MasterControl", new { parentID = "<#= id #>" })) .Sortable() .ToHtmlString() )) // Bind CONTROLS .DataBinding(dataBinding => dataBinding.Ajax() .Select("_ControlsForObjectiveHierarchyAjax", "MasterControl", new { parentID = "<#= id #>" })) .Sortable() .ToHtmlString() )) // Bind OBJECTIVES .DataBinding(dataBinding => dataBinding.Ajax() .Select("_ObjectivesForRiskHierarchyAjax", "MasterControl", new { parentID = "<#= id #>" })) .Pageable() .Sortable() .Filterable() .ToHtmlString() )) // Bind RISKS .DataBinding(dataBinding => dataBinding.Ajax() .Select("_RisksForRiskAreaHierarchyAjax", "MasterControl", new { parentID = "<#= id #>" })) .Sortable() .ToHtmlString() )) // Bind RISK AREAS .DataBinding(dataBinding => dataBinding.Ajax() .Select("_RiskAreasForProcessHierarchyAjax", "MasterControl", new { parentID = "<#= id #>" })) .Sortable() .ToHtmlString() )) // Bind PROCESSES .DataBinding(dataBinding => dataBinding.Ajax().Select("_ProcessHierarchyAjax", "MasterControl")) .Pageable(paging => paging.PageSize(10)) .Sortable() .Filterable() )
这相当前树形数据的一个层级显示。
我想让中间的某一个dataview隐藏,不显示,但是他的代码还会执行。相当于操作.columns.Bound(r => r.Name).Title("Entity").Visible(false);但是这次操作的是dataview,大神们有谁这样操作过啊