我有一个带有HierarchyChildTemplate的telerik RadGridView,可以在展开时显示子网格。现在,我希望同时只展开一个项目。这应该怎么做呢?我可以找到WinForms的选项,但不能在WPF中使用。
我使用HierarchyChildTemplate来显示here所解释的网格
我尝试实现了"RowIsExpandedChanging“事件,但不知道从那里到底要做什么。我可以这样做:
private void RowIsExpandedChanging_EventHandler(RowCancelEventArgs eventArgs)
{
eventArgs.Row.GridViewDataControl.CollapseAllHierarchyItems();
}但这将导致堆栈溢出,因为它将递归调用自身。
如有任何帮助,我们不胜感激!
发布于 2018-10-25 19:52:16
我假设,你有
<telerik:GridViewToggleRowDetailsColumn> 因为这是RadGridView的功能列,它显示"+“或"-”。如果是,设置它的属性:
ExpandMode="Single"https://stackoverflow.com/questions/52816462
复制相似问题