title: Drag files out of a datagridview
body: <p>Hello I would like to be able to drag a row out of a datagridview to copy a file to the location I drop it.</p>
  
  <p>Rows are single select and I have a file path column that has the full source path for the row's file.</p>
  
  <p>Is there something I can do with DragLeave to hold on to that file path and when I release the mouse perform the copy?</p>
  
  <p>Ended up using a modifier key, but it works. Only for one file at a time because of how I programmed my context menu.</p>
  
  <pre><code>if (Control.ModifierKeys == Keys.Shift)
  {
        //Drag out
        string[] selectedFiles = new String[1];
        selectedFile[0] = filesGrid[pathColumn.Index,filesGrid.SelectedRows[0].Index].Value.ToString();
        DataObject dragData = new DataObject(DataFormats.FileDrop, selectedFiles);
        dragData.SetData(DataFormats.StringFormat, selectedFiles[0]);
        DoDragDrop(dragData, DragDropEffects.Copy);
  }
  </code></pre>