Hi,
I have four textboxes, And one DataGridView that contains four columns.
When I clik a row on the DataGridView the data in row will be display in the perticular textbox. Can anybody Please help me.
Thanks,
Sridhar.
Populating the textboxes from DataGridView
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Adnan Hasan41 reputationPosted May 8, 2006, 3:19 AM EDT
Hello!
MyView = (DataRowView)this.DATAGRIDVIEWNAME.SelectedRows[0].DataBoundItem; DataRow MyRow = MyView.Row;Put the following code in the Click or Double Lcick event of the content of DataGridView
< -- Code Start -->
DataRowView
TextBox1.text = (string)MyRow["fieldname"]; // this is the field name which is bind to certain column of DataGridView.
< -- Code Ends -->
You can also explore MyRow for further help and accessing right column.
Thank You
Adnan Hasan
sridhar reddy12 reputationPosted May 9, 2006, 3:06 AM EDT
Sridhar.