title: Several WPF DataGrids - Multiselection
body: <p>I have following structure on the GUI. (Pseudocode)</p>
  
  <pre><code>StackPanel
    DataGrid1
      RowA
      RowB
    DataGrid2
      RowC
      RowD
  </code></pre>
  
  <p>Both datagrids have SelectionMode=Extended and RowSelection is allowed.</p>
  
  <p>Following scenario:</p>
  
  <p>1) User clicks on RowA --.> RowA becomes selected.</p>
  
  <p>2) User clicks on RowD while pressing shift. --> RowA, RowB, RowC and RowD is correctly selected (logic implemented by myself).</p>
  
  <p>3) User clicks on RowB. --> RowB is selected. RowA, RowC and RowD are not selected. Also the cells from these unselected rows are not selected. The selected index from the DataGrid2 = -1. SelectiItems are null. All is fine.</p>
  
  <p>4) User clicks on RowC while pressing shift. --> Now the problems comes up: RowB, RowC AND RowD IS SELECTED!!!</p>
  
  <p>I think RowD is selected because the grid believes, that the last selection in this DataGrid2 was from RowC to RowD. Now the user clicks on RowC while pressing Shift and so the grid beliefs the user makes a selection from RowD to RowC. But that is wrong. </p>
  
  <p>How can I refresh this selection status inside this grid. The grid remembers which row was selected before to determine which are rows are to be selected if the user makes a new selection while pressing shift. But the stored information which row was last selected is wrong. How can I update or clear this wrong information.</p>
  
  <p>Thanks for your assistance.</p>