Binding ItemsSource of a ComboBoxColumn in WPF DataGrid

Pls, check if DataGridComboBoxColumn xaml below would work for you: <DataGridComboBoxColumn SelectedValueBinding=”{Binding CompanyID}” DisplayMemberPath=”Name” SelectedValuePath=”ID”> <DataGridComboBoxColumn.ElementStyle> <Style TargetType=”{x:Type ComboBox}”> <Setter Property=”ItemsSource” Value=”{Binding Path=DataContext.CompanyItems, RelativeSource={RelativeSource AncestorType={x:Type Window}}}” /> </Style> </DataGridComboBoxColumn.ElementStyle> <DataGridComboBoxColumn.EditingElementStyle> <Style TargetType=”{x:Type ComboBox}”> <Setter Property=”ItemsSource” Value=”{Binding Path=DataContext.CompanyItems, RelativeSource={RelativeSource AncestorType={x:Type Window}}}” /> </Style> </DataGridComboBoxColumn.EditingElementStyle> </DataGridComboBoxColumn> Here you can find another solution for the problem you’re facing: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)