954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Passing data from a datagrid to textbox

Hi All,

I need help in passing data from a datagridview control to textboxes control. When the user select the data from datagridview and then click the command button control in form1, I want the record to be displayed in the texboxes of form2. How do I go about coding this? Any help would be highly welcome.

Thanks...

lilianw
Newbie Poster
3 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

You need to capture ,user clicks on which cell.
Then capture the data in that cell.
Store in public variable.
Show the form 2 and display in a textbox.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

see this sample:

Attachments Datagrid.zip (3.07KB)
Mbt925
Junior Poster in Training
63 posts since Dec 2007
Reputation Points: 10
Solved Threads: 5
 
see this sample:

Thankyou very much, life saver!
needed it for my school computing project!!!!

hasinarshad
Newbie Poster
1 post since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You