views:

2096

answers:

4

Does anybody know/have an example of how to change WPF DataGrid layout to be something like card-view or anything else, not just stack of rows?

+1  A: 

Instead of a datagrid, try using a combination of a listview or listbox (depending on which functionality you want - both derive from ItemsSource) and datatemplates. Both of these are standard WPF, not part of the toolkit.

http://blah.winsmarts.com/2007-3-WPF__The_DataTemplate,_choosing_how_your_data_will_look_like.aspx

Jarrett Meyer
A: 

I don't know how to do it with WPF Toolkit's DataGrid and I doubt it's what you actually need. You can do it with a ListView or ListBox. Set ListView.View to a WrapPanel with IsItemsSource="True". Then use a DataTemplate to make the cards. There is a pretty good example that will get you most of the way there here.

Bryan Anderson
+1  A: 
hughdbrown
You have changed template of the ListBox, but the question was about the DataGrid.
alex
A: 

If you want a datagrid that was designed to do this, in a full-featured way (grouping, editing in the cards, even 3D "cover flow" like modes), take a look at this grid. Xceed DataGrid for WPF Pro Edition

Odi - Xceed