如何隐藏数据网格详细信息行
我有一个数据网格,其 RowDetialsVisibilityMode
设置为 VisibleWhenSelected
,并相应设置了 RowDetailsTemplate。当用户选择一行时,会显示详细信息,这与描述的完全相同。然而,在查看详细信息后,用户希望再次隐藏该行详细信息而不显示另一行的详细信息。如何最好地实现这一点。
更新:正如评论中提到的,最好的选择可能是详细信息行中的一个按钮来隐藏该行,但我想知道绑定会是什么样子?
I have a datagrid with the RowDetialsVisibilityMode
set to VisibleWhenSelected
, and the RowDetailsTemplate set accordingly. When the user selects a row, the detail shows, which is exactly as described. However after reviewing the details, the user would like to hide the row detail again without showing the details of another row. How is this best accomplished.
Update: As mentioned in the comments, the likely the best option would be a button in the details row to hide the row, but then I wonder what would the binding look like?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于此功能是基于演示的,因此我会为按钮创建一个折叠行的行为,
并且在 XAML 中:
Since this functionality is presentation-based, I'd create a behavior for the button that would collapse the row
And in XAML: