My WPF application generates sets of data which may have a different number of columns each time. Included in the output is a description of each column that will be used t
I have found a blog article by Deborah Kurata with a nice trick how to show variable number of columns in a DataGrid:
Populating a DataGrid with Dynamic Columns in a Silverlight Application using MVVM
Basically, she creates a DataGridTemplateColumn
and puts ItemsControl
inside that displays multiple columns.