title: DevExpress GridView FocusedRowHandle Does not update on right click
body: <p>I have a DevExpress datagridview that list a number of jobs that our employees must do some work on. In practice, a job(row) is right clicked, and a menuItem to launch a different part of the program is selected. The information that is filled into the next part of the program comes from the FocusedRowHandle.  </p>
  
  <pre><code>Dim someString as String = gvMyGV.GetRowCellValue(gvMyGV.FocusedRowHandle, "ColumnHeader")
  </code></pre>
  
  <p>Now, if the employee left clicks the row to select it, and then right clicks -> MenuItem to launch the next step, all is well. But if they right click any other row that is not already highlighted, the FocusRowHandle does not update to the newly clicked row until after the next stage is launched, causing it to load the information for the job that was selceted before they performed the right click.  </p>
  
  <p>The DevEx selected row highlighting visually updates (row turns yellow), but the FocusedRowHandle Value sticks until after the Context Menu closes.  </p>
  
  <p>I need the RowHandle to update on the right click, before the ContextMenu loads.    </p>
  
  <p>SOLUTION FOUND:  </p>
  
  <pre><code> Private Sub gvMyGV_MouseDown(sender As Object, e As MouseEventArgs) Handles gvMyGV.MouseDown
      If e.Button = MouseButtons.Right Then
          Dim hitInfo As GridHitInfo = gvMyGV.CalcHitInfo(New Point(e.X, e.Y))
          gvStatus.FocusedRowHandle = hitInfo.RowHandle
      End If
  End Sub
  </code></pre>