Hi friends,
The following code expect the DataGridRow background to be changed based on the value of DataGridComboBoxColumn Serviceability. but it is not happening for ComboBox Columns but same is tested with text box columns and same is happening
<DataGrid.Resources><Style TargetType="DataGridRow"><Style.Triggers><DataTrigger Binding="{Binding SERVICEABILTY}" Value="Serviceable"><Setter Property="Background" Value="Green" /></DataTrigger><DataTrigger Binding="{Binding SERVICEABILTY}" Value="NotServiceable"><Setter Property="Background" Value="Red" /></DataTrigger></Style.Triggers></Style></DataGrid.Resources><DataGridComboBoxColumn SelectedValueBinding="{Binding SERVICEABILITY, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedValuePath="SERVICEABILTY" DisplayMemberPath="SERVICEABILTY" Header="Serviceabilty" ><DataGridComboBoxColumn.ElementStyle><Style TargetType="ComboBox"><Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}, Path=combodisplayMC_CARD}" /><Setter Property="ItemTemplate"><Setter.Value><DataTemplate><TextBlock Foreground="Blue" Text="{Binding Path=SERVICEABILTY}"/></DataTemplate></Setter.Value></Setter></Style></DataGridComboBoxColumn.ElementStyle><DataGridComboBoxColumn.EditingElementStyle><Style TargetType="ComboBox"><Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}, Path=combodisplayMC_CARD}" /><Setter Property="ItemTemplate"><Setter.Value><DataTemplate><TextBlock Foreground="DarkMagenta" Text="{Binding Path=SERVICEABILTY}"/></DataTemplate></Setter.Value></Setter></Style></DataGridComboBoxColumn.EditingElementStyle></DataGridComboBoxColumn>
itismeiqbal