title: WPF Databinding with RelativeSource and AncestorType
body: <p>I am trying to get some binding code working. Bascially I want to bind the IsEnabled property of an element of my grid's context menu with a value of the selected row in the grid. </p>
  
  <p>I have it working with this:</p>
  
  <pre><code>            &lt;my:DataGrid.ContextMenu&gt;
                  &lt;ContextMenu DataContext="{Binding PlacementTarget.SelectedItem, RelativeSource={RelativeSource Self}}"&gt; 
                      &lt;MenuItem Header="Grant Access" IsEnabled="{Binding Connectable}"/&gt;
                  &lt;/ContextMenu&gt;
              &lt;/my:DataGrid.ContextMenu&gt;
  </code></pre>
  
  <p>But I want to do it this way and it's not working. It doesn't error but just doesn't disable the menu item. Any idea why?</p>
  
  <pre><code>            &lt;my:DataGrid.ContextMenu&gt;
                  &lt;ContextMenu&gt; 
                      &lt;MenuItem Header="Grant Access" IsEnabled="{Binding Path=SelectedItem.Connectable, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type my:DataGrid}}}"/&gt;
                  &lt;/ContextMenu&gt;
              &lt;/my:DataGrid.ContextMenu&gt;
  </code></pre>