title: WPF datagrid: DataGridCheckBoxColumn events
body: <p>In my WPF project I have build the following <code>datagrid</code> with checkbox column:</p>
  <p>XAML</p>
  <pre><code>&lt;DataGrid AutoGenerateColumns=&quot;False&quot;
            TargetUpdated=&quot;IsIntermediatePointFixedByBracketDataGrid_TargetUpdated&quot;&gt;
          &lt;DataGrid.Columns&gt;               
              &lt;DataGridCheckBoxColumn Binding=
                  &quot;{Binding isFixedByBracket, NotifyOnTargetUpdated=True }&quot; /&gt;
          &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  <p>C#</p>
  <pre><code>private void IsIntermediatePointFixedByBracketDataGrid_TargetUpdated(object sender,
      DataTransferEventArgs e)
  {
      DataGrid dg = (DataGrid)sender;
      if (dg.SelectedIndex != -1 
          &amp;&amp; ((IsFixedByBracketElement)dg.SelectedItem).isFixedByBracket
          != this.currentIntermediatePosition.isFixedByBracket[dg.SelectedIndex])
      {
          this.currentIntermediatePosition.isFixedByBracket[dg.SelectedIndex] = 
                      ((IsFixedByBracketElement)dg.SelectedItem).isFixedByBracket;
      }
  }
  </code></pre>
  <p>When I check/uncheck a checkbox, the <code>TargetUpdated</code> event is thrown, but the value changes only if I select and deselect the cell that contains the checkbox.
  Why does this happen? How can I change this behavior?</p>