Using Datagrid within RowDetailsTemplate of another Datagrid

余生颓废 提交于 2019-12-01 21:25:00
Corey Sunwold

The last answer on this thread helped me: How is access inner Datagrid in Silverlight?.

On the inner DataGrid I set ItemsSource="{Binding Phones}" and removed the DataContext.

Jason Watts

Use the RowDetailsTemplate instead: DataGrid.RowDetailsTemplate Property.

You can bind to the DetailsVisibilityChanged event, and that will pass you the DataContext of the row that was clicked. From there you can retrieve the details data and update the RowDetailsTemplate accordingly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!