Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi......I have two windows forms.
Form1 contains 3 text boxes, Submit Button and Form2 contains DataGridView and Edit Button.

My question is I want to display selected row data of DatagridView in respective text boxes when I clicked edit button in Form2
Posted

1 solution

put this code in edit button click event

string name = dataGridView1.Rows[1].Cells[1].Value.ToString(); // this is just a sample u can change the index

pass this value as the argument of a function
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900