title: selecting a row in two wpf datagrid's at the same time
body: <p>For i project that I'm working on i need to be able the for example selected the first row in grid1 and automatically have the first row also selected in grid2 so that a row is selected in both grids at the same time.</p>
  
  <p><strong>what is have already tried</strong></p>
  
  <ul>
  <li>using a stackpanal</li>
  </ul>
  
  <p>i created a method for setting the selected item in the gids</p>
  
  <pre><code>        private void SyncDataGridItemSelection(int number)
          {
          //sync pricegrid with printertick grid
          if (number == 1)
          {
              int printertickselection = PrinterTicksGrid.SelectedIndex;
              //detachs change event
              PrinterPriceGrid.SelectionChanged -= (PrinterPriceGrid_SelectionChanged);
              //change printerpricegrid selection
              PrinterPriceGrid.SelectedIndex = printertickselection;
              //attach change event
              PrinterPriceGrid.SelectionChanged += (PrinterPriceGrid_SelectionChanged);
          }
          //sync printertick grid with price grid
         else if (number == 2)
          {
              int printerpriceselection = PrinterPriceGrid.SelectedIndex;
              //detachs change event
              PrinterTicksGrid.SelectionChanged -= (PrinterTicksGrid_SelectionChanged);
              //change PrinterTicksgrid selection
              PrinterTicksGrid.SelectedIndex = printerpriceselection;
              //attach change event
              PrinterTicksGrid.SelectionChanged += (PrinterTicksGrid_SelectionChanged);
          }
      }
  </code></pre>
  
  <p>i have also looked at documention from MSDN involving focus but to no success.</p>
  
  <p><em>the GUI is already in place so rewriting is not an option</em></p>
  
  <p>Is this even possible to do and if so how?</p>