0

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 - 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.

Community
  • 1
  • 1
benPearce
  • 37,735
  • 14
  • 62
  • 96

1 Answers1

1

Check out listview > grid view.

with datatemplate yes

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

keyle
  • 2,762
  • 3
  • 24
  • 27