title: WPF Datatrigger for DataGrid only changing the entire row
body: <p>I've got a DataGrid with a DataTrigger setup, so when it's value is "UP" I'd like the trigger to only change the background in the 'directionColumn' datagridcolumn only. </p>
  
  <p>What I've got so far updates the entire row. I also tried placing 'targetname' in the setter element but that just gives an error. Please help.</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;DataGrid AutoGenerateColumns="False" ItemsSource="{Binding}" Name="summaryReportDataGridDATE" RowDetailsVisibilityMode="VisibleWhenSelected" Width="330"&gt;
      &lt;DataGrid.CellStyle&gt;
          &lt;Style TargetType="DataGridCell"&gt;
              &lt;Style.Triggers&gt;
                  &lt;DataTrigger Binding="{Binding Path=Direction}" Value="UP"&gt;
                      &lt;Setter&gt;
                          &lt;Setter.Property&gt;Background&lt;/Setter.Property&gt;
                          &lt;Setter.Value&gt;Red&lt;/Setter.Value&gt;
                      &lt;!--&lt;Setter Property="Background" Value="Red" TargetName="directionColumn"/&gt;--&gt;
                      &lt;/Setter&gt;
                  &lt;/DataTrigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/DataGrid.CellStyle&gt;
      &lt;DataGrid.Columns&gt;
          &lt;!--&lt;DataGridTemplateColumn x:Name="dateColumn" Header="Date" Width="100" CanUserReorder="False" CanUserSort="False" FontFamily="Arial Rounded MT" &gt;
              &lt;DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;DatePicker SelectedDate="{Binding Path=Date, Mode=OneWay}" /&gt;
                  &lt;/DataTemplate&gt;
              &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;/DataGridTemplateColumn&gt;--&gt;
  
          &lt;DataGridTextColumn x:Name="dateColumn" Binding="{Binding Path=Date, StringFormat={}{0:dd/MM/yyyy}}" Header="Date"  Width="80" CanUserReorder="False" CanUserSort="False" FontFamily="Arial Rounded MT"/&gt;
          &lt;DataGridTextColumn x:Name="closeColumn" Binding="{Binding Path=ClosingPrice}" Header="ClosingPrice" Width="80" CanUserReorder="False" CanUserSort="False" FontFamily="Arial Rounded MT" /&gt;
          &lt;DataGridTextColumn x:Name="directionColumn" Binding="{Binding Path=Direction}" Header="Direction"  Width="80" CanUserReorder="False" CanUserSort="False" FontFamily="Arial Rounded MT" /&gt;
          &lt;DataGridTextColumn x:Name="resultColumn" Binding="{Binding Path=Result}" Header="Result"  Width="80" CanUserReorder="False" CanUserSort="False" FontFamily="Arial Rounded MT"  /&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>