cmd
cmd

Reputation: 525

WPF nested datagrids. Multiple levels

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?

Syncfusion datagrid

With standard row details nested grids looks ugly, because row details must have fixed height (so i will get multiple scrolls)

My demo application

Upvotes: 3

Views: 15713

Answers (1)

Tony Vitabile
Tony Vitabile

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

Related Questions