Question Doubleclick row in DataGridView and copy to RichTextBox

Joebu

Member
Joined
Mar 12, 2010
Messages
5
Programming Experience
Beginner
Greetings all. I just found this wonderful forum and plan on being part of it for a long time to come.
I am very new to programming so let me apologize for that upfront.

Here is my situation.
I am using Visual Studio 2008 and have created a windows application form. I have the form connected to an MS Access database named vendors.accdb. I have added a DataGridView to my form named VendorsDataGridView. I have also added a RichTextBox to my form named RichTextBox1.

The columns of my VendorsDataGridView are:
Vendor
Description
Pack/Size
Price
Brand
Product_ID

I have my form setup to run queries that compare like items from different vendors and display them in the VendorsDataGridView.

What I need the form to do is when I doubleclick on a particular row (in the VendorsDataGridView) I need it to copy to the RichTextBox1 and go down to the next line so I can add more rows from different queries.
I need to understand what goes between the Private Sub and End Sub of this:
Private Sub VendorsDataGridView_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles VendorsDataGridView.DoubleClick

End Sub

I have searched high and low for the answer to this. I have tried a variety of things but none have worked. I have been reading different books to try and understand Visual Basic code better but I am too new to programming to get the doubleclick event to work.

Any information will be greatly appreciated.
 
Back
Top