Reputation: 525
I'm trying to create table editor for multi-level table data using standard wpf datagrid. Is it possible to create nested structure something like this?
With standard row details nested grids looks ugly, because row details must have fixed height (so i will get multiple scrolls)
Upvotes: 3
Views: 15713
Reputation: 8594
Each DataGrid
can have something called a RowDetailsTemplate
. The template can have anything you want in it, including another DataGrid
. If that DataGrid
uses the same RowDetailsTemplate
, you can have a DataGrid
nested inside a DataGrid
ad-infinitum.
Check out this article for an example of using the RowDetailsTemplate
. You just need to modify the XAML there to use your own template.
Upvotes: 8