title: How to avoid selecting DataGridRow in ParentDataGrid by Clicking in DataGridDetailsPresenter?
body: <p>I have a DataGrid (ParentDataGrid) with a DataGridDetailsPresenter. In the DataGridDetailsPresenter I have another DataGrid (ChildDataGrid). If I select a Row in the ChildDataGrid the surrounding DataGridRow of the ParentDataGrid is selected too.</p>
  
  <p>I get that both the ParentDataGrid and the ChildDataGrid throws the SelectionChanged event. I tried to deselect selection in ParentDataGrid. But then the primary selection in the ParentDataGrid is changed. Therefore I want to avoid selecting DataGridRow in ParentDataGrid.</p>
  
  <p>How to avoid selecting DataGridRow in ParentDataGrid by Clicking in DataGridDetailsPresenter?</p>
  
  <p>This is my DataTemplate</p>
  
  <pre><code>&lt;DataTemplate DataType="{x:Type MyViewModel}"&gt;
  &lt;DataTemplate.Resources&gt;...
  &lt;Style TargetType="{x:Type DataGridRow}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type DataGridRow}"&gt;
                  &lt;Border ...&gt;
                    &lt;SelectiveScrollingGrid&gt;
                        &lt;SelectiveScrollingGrid.ColumnDefinitions&gt;
                            &lt;ColumnDefinition Width="Auto" /&gt;
                            &lt;ColumnDefinition Width="*" /&gt;
                        &lt;/SelectiveScrollingGrid.ColumnDefinitions&gt;
                        &lt;SelectiveScrollingGrid.RowDefinitions&gt;
                            &lt;RowDefinition Height="*" /&gt;
                            &lt;RowDefinition Height="Auto" /&gt;
                        &lt;/SelectiveScrollingGrid.RowDefinitions&gt;
  
                        &lt;DataGridRowHeader Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" .../&gt;
                        &lt;DataGridCellsPresenter Grid.Row="0" Grid.Column="1" .../&gt;
                        &lt;DataGridDetailsPresenter Grid.Row="1" Grid.Column="1" .../&gt;
  
                    &lt;/SelectiveScrollingGrid&gt;
                  &lt;/Border ...&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  &lt;/DataTemplate.Resources&gt;
  
  &lt;Grid ...&gt;
  
  &lt;DataGrid x:Name="ParentDataGrid" ...&gt;
      &lt;DataGrid.Columns&gt;...&lt;/DataGrid.Columns&gt;
  
      &lt;DataGrid.RowDetailsTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Grid ...&gt;
                  &lt;DataGrid x:Name="ChildDataGrid"...&gt;...&lt;/DataGrid&gt;
              &lt;/Grid&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGrid.RowDetailsTemplate&gt;
  
  &lt;/DataGrid&gt;
  
  &lt;/Grid&gt;
  &lt;/DataTemplate&gt;
  </code></pre>