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.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sridhar reddyPosted May 9, 2006, 7:06 AM
Sridhar.
Adnan HasanPosted May 8, 2006, 7:19 AM
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