tags:

views:

109

answers:

1

I have a hierarchical data structure that I need displayed in WPF. I'm very new to WPF and have been trying to come up with a way to do this. But, alas, I have drawn a blank and ask you guys for help. My data structure looks like this:

  • Ford
    • F-150
      • 2009
        • P4445
      • 2008
        • N998
      • 2007
        • M775
    • F-350
      • 2008
        • N999
      • 2007
        • M777

I want the data to be displayed in a table for easy lookup like so:

Ford
Model              | 2009    | 2008    | 2007
---------------------------------------------
F-150              | P4445   | N998    | M775
F-350              |         | N999    | M777

I am totally lost on how to accomplish this or if it is even possible. It would be easier if it was in a tabular format, but sadly I cannot change the structure of the data. What would be the best and most efficient way (I probably have 70 models I need to display at once) to do this in WPF?

A: 

use the TreeView Control. Check this article.

Muad'Dib