It would be best if showed you my code first and then ask the question:
<Window DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Grid>
<DataGrid ItemsSource="{Binding Printers}" >
<DataGrid.Columns>
<DataGridComboBoxColumn Header="Drucker Typ" ItemsSource="{Binding Relative" SelectedItemBinding="{Binding PrinterType, Mode=TwoWay}" Width="Auto" ItemsSource="{Binding}" />
</DataGrid.Columns>
</DataGrid>
</Window>
I have the DataGridComboBoxColumn
and want to bind the ItemsSource
to the DataContext
of the Window and the SelectedItem
to the current ItemsSource
Object of the DataGrid.
How can this be done ?
Thanks!