Master Detail in WPF Grid

Jul 9, 2009 at 12:05 AM

I've a requirement of creating Master Detail scenario in grid and need to use Office theme. Xceed WPF Datagrid provides this out of box.

Can Master Detail scenario be implemented easily in WPF datagrid? And, can Office theme be used in WPF datagrid?

Coordinator
Jul 10, 2009 at 9:50 PM

Hi, yes, Master Detail can be accomplished with the WPF DataGrid.  Note that you can either do Master/Detail within the DataGrid itself using the RowDetails feature, or you can use a CollectionViewSource as the data source to create a Master Detail using multiple WPF controls (for example DataGrid as your Master and a Grid with a bunch of textblocks as the Detail).  A really easy way to build the latter master/detail is to use the new Data Sources Window available in Visual Studio 2010 - as long as you hook up a data source which has foreign key relationships (showing which data is the master and which is the detail), you can use the tool to simply drag on a datagrid and/or other WPF control and the tool will automatically wire up a CollectionViewSource which enables the Master/Detail.

We don't provide an Office theme out of the box, but the controls are all fully restylable, so you can apply an existing Office theme or build your own.