title: DGV DragDrop - row disappearing
body: <p>I'm attempting to write some code to allow the users of my application to drag and drop rows in a DataGridView to reorder them. The problem is, the row that is being dragged disappears when it's dropped - so dragging and dropping has the effect of just removing that row. Here is my code:</p>
  
  <pre><code>  private Rectangle dragBoxFromMouseDown;
          private int rowIndexFromMouseDown;
          private int rowIndexOfItemUnderMouseToDrop;
  
          private void grdCons_MouseMove(object sender, MouseEventArgs e)
          {
              if ((e.Button &amp; MouseButtons.Left) == MouseButtons.Left)
              {
                  if (dragBoxFromMouseDown != Rectangle.Empty &amp;&amp; !dragBoxFromMouseDown.Contains(e.X, e.Y))
                  {
                      DragDropEffects dropEffect = grdCons.DoDragDrop(grdCons.Rows[rowIndexFromMouseDown], DragDropEffects.Move);
                  }
              }
          }
  
          private void grdCons_MouseDown(object sender, MouseEventArgs e)
          {
              rowIndexFromMouseDown = grdCons.HitTest(e.X, e.Y).RowIndex;
              if (rowIndexFromMouseDown != -1)
              {
                  Size dragSize = SystemInformation.DragSize;
                  dragBoxFromMouseDown = new Rectangle(new Point(e.X - (dragSize.Width / 2), e.Y - (dragSize.Height / 2)), dragSize);
              }
              else
              {
                  dragBoxFromMouseDown = Rectangle.Empty;
              }
          }
  
          private void grdCons_DragOver(object sender, DragEventArgs e)
          {
              e.Effect = DragDropEffects.Move;
          }
  
          private void grdCons_DragDrop(object sender, DragEventArgs e)
          {
              Point clientPoint = grdCons.PointToClient(new Point(e.X, e.Y));
              rowIndexOfItemUnderMouseToDrop = grdCons.HitTest(clientPoint.X, clientPoint.Y).RowIndex;
  
              if (e.Effect == DragDropEffects.Move)
              {
                  DataGridViewRow rowToMove = e.Data.GetData(typeof(DataGridViewRow)) as DataGridViewRow;
                  grdCons.Rows.RemoveAt(rowIndexFromMouseDown);
                  grdCons.Rows.Insert(rowIndexOfItemUnderMouseToDrop, rowToMove);
              }
          }
  </code></pre>
  
  <p>At a guess, the Insert on the DGV on the DragDrop event isn't working.</p>