title: Xceed extended WPF datagrid select row with right click
body: <p>I am trying to add a context menu to an Xceed extended WPF datagrid. I am able to show the context menu and the commands fire from the menu, but right clicking on a row does not set it as the selected row and so the wrong record is used by the command.</p>
  
  <p>Is there a way to change the way the selected item is set so that it can be updated by right click?</p>
  
  <pre><code>&lt;xcdg:DataGridControl ItemsSource="{Binding Source={StaticResource RecordsForList}}" SelectedItem="{Binding SelectedRecord}"&gt;
      &lt;xcdg:DataGridControl.ContextMenu&gt;
          &lt;ContextMenu&gt;
              &lt;MenuItem Command="{Binding OpenCommand}" Header="Open" /&gt;
          &lt;/ContextMenu&gt;
      &lt;/xcdg:DataGridControl.ContextMenu&gt;
  &lt;/xcdg:DataGridControl&gt;
  </code></pre>