title: access the Window's DataContext from within a DataGrid
body: <p>I have some problem to access the Window's DataContext from within a DataGrid.</p>
  
  <p>The DataGrid is bound to a IBindingList: </p>
  
  <pre><code>public IBindingList Items{ get; set; }
      private void initItems()
      {
          //ItemFactory is a Linq2SQL Context, Items is the view of availabe Items
          this.Items = this.ItemFactory.Items.GetNewBindingList();
      }
  </code></pre>
  
  <p>From within my xaml I try to get those data to fill a ComboBox:</p>
  
  <pre><code> &lt;DataGridComboBoxColumn Header="Typ" 
                               DisplayMemberPath="Description"
                               SelectedValuePath="ItemID"      
                               ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}, Mode=OneWay, Path=DataContext.Items, UpdateSourceTrigger=PropertyChanged}" /&gt;
  </code></pre>
  
  <p>But it doesn't work. I tried out many variants already. The ComboBox gets not populated.<br>
  Any help greatly appreciated! </p>
  
  <p><strong>Note:</strong></p>
  
  <p>The following ComboBox in the same Window does work:</p>
  
  <pre><code>&lt;ComboBox x:Name="workingCombo" ItemsSource="{Binding Path=Items}" DisplayMemberPath="Description" SelectedValuePath="ItemID" /&gt;
  </code></pre>