I have two collections that I want to display together in one table. I intend to use a horizontal DataGrid for this, and I'm trying to figure out what the best way is to expose the collections to the DataGrid. (a horizontal DataGrid solution is described here: WPF horizontal DataGrid )
A bit of a nonsensical example with chairs and tables. In my application I have a list of tables and a list of chairs (both Table and a Chair have a Date and NumberOfItems property):
public List<Table> TableList { get; set; }
public List<Table> ChairList { get; set; }
In xaml I want to DataBind to a combined list so that I would get something like:
Date | 01-Jan-2011 | 02-Jan-2011 | 03-Jan-2011 | 04-Jan-2011
Number of tables | 5 | 6 | | 7
Number of chairs | 3 | | 2 |
The TableList and ChairList do not have the same number of items. What would be the best approach to expose a bindable combined collection?