Row to Column Transformation

Apr 30, 2009 at 1:02 AM
Hi All,

Is there a way to  transform display so rows appear as column? At runtime, I need to retrieve a collection of entities and display them. 

I don't know the number of entities prior to retrieving from the database so I don't know the number of "columns" that need to be created.


This is an example:

Customer[0].Name Customer[1].Name    Customer[2].Name
Customer[0].Age Customer[1].Age        Customer[2].Age

How can I do this?  I'd like to use two-way databinding.

Thanks



May 1, 2009 at 8:58 AM
Where are you loading the collection from? You could use a cross tabulation in SQL and add each column to an ObservableCollection I think, but your DataGrid would have an indefinite number of columns.