title: WPF/Xaml Binding DataGrid Column Header and Cell to Different Values
body: <p>The following contrived example illustrates my problem. </p>
  
  <p>My ViewModel:</p>
  
  <pre><code>public class MyViewModel : ViewModel 
  {
      public MyViewModel() 
      {
          var table = new DataTable("MyDatatable");
          table.Columns.Add("Some Val", typeof(double));
          table.Columns.Add("Ref");
  
          var row = table.NewRow();
          row["Some Val"] = 3.14;
          row["Ref"] = new {Title = "My Title", Description = "My Description"};
          table.Rows.Add(row);
  
          MyDataView = table.DefaultView;
      }
  
      DataView MyDataView { get; set; }   
  }
  </code></pre>
  
  <p>Now my problem lies in my Xaml code. I want one of my column headers to be "My Title" with the corresponding row value to be "My Description"...</p>
  
  <p>My Xaml:</p>
  
  <pre><code>&lt;DataGrid ItemsSource="MyDataView" AutoGenerateColumns="False"&gt;
    &lt;DataGrid.Columns&gt;
      &lt;!--This column works fine. --&gt;
      &lt;DataGridTextColumn Header="Some Val" Binding="{Binding 'Some Val'}" Width="50"/&gt;
      &lt;!--This column doesn't work... I'm looking for something similar to this: --&gt;
      &lt;DataGridTextColumn Header="{Binding Path='Ref.Title'}" Binding="{Binding Path='Ref.Description'}"/&gt;
    &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>Does this make sense? The second column header should be "My Title" with the cell value being "My Description". Any idea on how to do this?</p>