i want to click on a row in grid view and the details of each attribute can show separately in textbox field. i had type this in my coding part, but it doesnt work. may i know how to do it? thanks you.
Dim text As New TextBox
Dim sql_productname As String = " select Product_name from Product_detail where Product_name = """ & grid_bed(nowrow, 0).Value & """"
txt_name.Text = sql_productname
Select your gridview and go to property and then Event & then select MouseClick event and Double click . Then add the follwing Code
Dim i As Integer i = DataGridView1. CurrentRow.Index textbox1.Text = DataGridView1. Item(0, i).Value TextBox2. Text = DataGridView1. Item(1, i).Value fextBox3. Text = DataGridView1. Item(2, i).Value textbox3. Text = DataGridView1. Item(3, i).Value