title: Grouping Categorized Data In WPF
body: <p>Here is what I am trying to do.</p>
  
  <p><strong><em>Dynamic Category:</em></strong></p>
  
  <ol>
  <li>Columns can be 0 or more.</li>
  <li>Must contain 1 or more <em>Type Columns</em>.</li>
  <li>Will only be displayed if <em>any row</em> contains <em>Type Column</em> data associated with it.</li>
  </ol>
  
  <p><strong><em>Data Rows:</em></strong></p>
  
  <ol start="4">
  <li>Will be added <em>Asynchronously</em>.</li>
  <li>Will be grouped by a <em>Common
  Category</em> column.</li>
  <li>Will add a Dynamic Category if it
  does not yet exist.</li>
  <li>Will add a Type Column if it does
  not yet exist within its appropriate
  Dynamic Category.</li>
  </ol>
  
  <p><strong><em>Platform Info:</em></strong></p>
  
  <ul>
  <li>WPF</li>
  <li>.Net 3.5 sp1</li>
  <li>C#</li>
  <li>MVVM</li>
  </ul>
  
  <p>I have a few partially functional prototypes, but each has it's own major set of problems.  Can any of you give me some guidance on this?  </p>
  
  <p>Envision this nicely styled. :-)  </p>
  
  <pre><code>    --------------------------------------------------------------------------
      |[  Common Category  ]|[ Dynamic Category  0 ]|[   Dynamic Category N   ]|
      --------------------------------------------------------------------------
      |[Header 1]|[Header 2]|[  Type 0  ]|[ Type N ]|[  Type 0   ]|[  Type N  ]|
      --------------------------------------------------------------------------
      |[Data 2 Group]                                                          |
      --------------------------------------------------------------------------
      |  Data A  | Data 2  ||    Null    |  Data 1  ||   Data 0   |  Data 1   ||
      |  Data B  | Data 2  ||   Data 0   |   Null   ||   Data 0   |  Data 1   ||
      --------------------------------------------------------------------------
      |[Data 1 Group]                                                          |
      --------------------------------------------------------------------------
      |  Data C  | Data 1  ||    Null    |  Data 1  ||   Data 0   |  Data 1   ||
      |  Data D  | Data 1  ||    Null    |   Null   ||   Data 0   |   Null    ||
      --------------------------------------------------------------------------
  </code></pre>
  
  <p>Edit: Sorting and Paging is not necessary.  </p>
  
  <p>I have looked at nested <em>ListViews</em> and <em>DataGrids</em>, dynamically building a Grid.  Dynamically building a Grid and leveraging the <em>SharedSizeGroup</em> property seems the most promising strategy, but I am concerned about performance.</p>
  
  <p>Would a better approach be to consider this a dynamic report?  If so,  what should I be looking at?</p>
  
  <p>Thanks for your help.</p>