Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paste Data into DataGridView

Status
Not open for further replies.

mjjks

Programmer
Jun 22, 2005
138
US
Hi. I have an editable datagridview on windows form.
I'd like to add ability to paste data from clipboard into datagridview.
Example: I highlight two cells in a Excel spreadsheet, copy, highlight two cells on a datagridview row and paste.

General idea on how to approach this, or link to a sample would be great.
Thanks
 
I don't work with datagrids much because I generally don't like them, but basically:

capture the keypress and if control + v is pressed, grab the data from the clipboard. Try parsing that data and manually adding each new row to the view.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top