tags:

views:

30

answers:

1

I am rewriting a VB6 form in WPF for my companies internal application. The requirement is to display a collection of objects which can have any property edited.

The representation of the data is transposed so that each object is displayed as a column, rather than a row, adding more objects creates more columns:

             [Object 1]  [Object 2]...
[Property 1]
[Property 2]
[Property 3]

It does not appear that you can swap the rows and columns in the WPF Datagrid without transforming the data - http://stackoverflow.com/questions/1470454/c-wpf-toolkit-datagrid-transpose-rows-and-columns

Is there a way to swap the columns and rows around through a transform, or would I be better doing a data template in a list view?

EDIT: I ended up going with an ItemsControl, using a Horizontal StackPanel as its ItemsPanelTemplate and a Grid as the DataTemplate. Seems to work well, looks exactly like what I was wanting.

+1  A: 

Check out listview > grid view.

with datatemplate yes

http://www.c-sharpcorner.com/UploadFile/mahesh/GridViewWpf11082009182813PM/GridViewWpf.aspx

keyle