Datagridview copy cell to clipboard

1
0

Hi!

Quick question (hopefully)

How do I copy the contents of a specific cell to clipboard when pressing ctrl-c ? I’ve tried the keypress event and also tried setting the ClipboardCopyMode to “ExludeUnselectedColumns”. Whatever I try I always copy the whole row with column headers regardless of the ClipboardCopyMode setting.

I also tried handling the KeyPress event and if the key was “c” then if My.Computer.Keyboard.CtrlKeyDown = True but this always returns false (My.Computer.Keyboard.CtrlShiftDown works though)

 

Can you help?

 

Thanks!

 

Vincent

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.