views:

742

answers:

1

I need to create a table structure that will automatically create columns for a collection of objects (the structure of which is pretty flexible). The data in the table will only be read only so I've been looking into using a GridView but can't figure out how to automatically generate the columns - has anyone got an example or a URL explaining how to do it?

I'm not totally adverse to using the DataGrid control included as part of the WPF ToolKit, but it seems a little over-kill for displaying readonly data...

A: 

I would look at this post on generating the columns for a GridView:

http://stackoverflow.com/questions/356144/wpf-gridview-with-a-dynamic-definition

Using the DataGrid would definitely be overkill.

Jeff Wain