The user control into which those 2 elements live has a property called ColumnTypes.
Each of those elements refer relatively with the same expression to the main datacontext, yet the first one does not work, while the latter does.
Do you have any idea how to investigate that ?
<DataGrid x:Name="DataGrid" AutoGenerateColumns="False" ItemsSource="{Binding Table}" >
<DataGrid.Columns>
<DataGridComboBoxColumn Header="Type" >
<DataGridComboBoxColumn.ItemsSource>
<Binding Path="DataContext.GetColumnTypes" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
</DataGridComboBoxColumn.ItemsSource>
</DataGridComboBoxColumn>
</DataGrid.Columns>
</DataGrid>
<ComboBox Grid.Row="1">
<ComboBox.ItemsSource>
<Binding Path="DataContext.GetColumnTypes" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
</ComboBox.ItemsSource>
</ComboBox>
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.UserControl', AncestorLevel='1''. BindingExpression:Path=DataContext.GetColumnTypes; DataItem=null; target element is 'DataGridComboBoxColumn' (HashCode=53813616); target property is 'ItemsSource' (type 'IEnumerable')