Telerik Radgrid WPF
我的 WPF 页面有 Telerik 提供的 RadGrid 控件。网格是一个嵌套网格,本质上意味着单击该行最左边列上的 (+) 符号会将行展开为子网格。这是通过在我的 XAML 中指定分层网格来完成的。当您单击该行并展开子网格时,一切正常,但最初选定行的 selectedItem 似乎没有改变。例如,最初选择网格的第 1 行,然后展开第 4 行以显示子网格。子网格已显示,但 selectedItem 仍为第 1 行。所需的行为是,一旦展开以显示子网格,第 4 行将成为 selectedItem。谁能指出这里到底出了什么问题。
谢谢
My WPF page has a RadGrid control provided by Telerik. The Grid is a nested grid which essentially means that clicking on the (+) sign on the leftmost column of the row expands the row into a Subgrid. This is being done by specifying a hierarchical grid in my XAML. Everything works just fine when you click on the row and expand the subgrid but the selectedItem of the initially selected row does not seem to change. An example would be selecting row 1 of the grid initially and then expanding row 4 to display the subgrid. The subgrid is displayed but the selectedItem is still row 1. The desired behavior is for row 4 to be the selectedItem once it is expanded to display the subgrid. Can anyone point out what exactly is going wrong over here.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你是对的 - 这是更新版本:
Your are right - here is the updated version:
这是一个示例:
XAML
C#
Here is an example:
XAML
C#