title: C# copy gridview contents to clipboard
body: <p>I have several gridviews. In each of them, I copy the contents to the clipboard using code like this:</p>
  
  <p>GV_Master.SelectAll();<br>
  DataObject dataObj = GV_Master.GetClipboardContent();<br>
  Clipboard.SetDataObject(dataObj, true);<br>
  GV_Master.ClearSelection();  </p>
  
  <p>On most cases this works as intended, copying the entire contents of the Gridview to the clipboard. In one case it copies only the cell in which I right clicked to invoke the context menu that calls the code above. The thing that is obviously different is that the gridviews that work have a data source, and the one that doesn't has rows that I individually populate. However, if what is being copied is the contents of the clipboard rather than the datasource, I don't see why this should matter. </p>
  
  <p>What am I missing?  </p>