hi Kl baiju,
Following is your solution and please mark my answer as accepted if it helped you :)
1. Following is your aspx file code:
first you need to add Command name and Command argument to the row.
The value for the CommandName can be "Edit"
The value for the CommandArgument =' <%#Container.DataItemIndex %>'
Generate onRowCommand event for your grid
OnRowCommand="sampleGrid_RowCommand"
On RowCommand event of the grid you can get the index of the grid and then you can load values using that index.
2. following is row command code for you .vb file
Protected Sub SampleGrid_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles SampleGrid.RowCommand
If e.CommandName = "Edit" Then
Load_Data_To_TextBox(e.CommandArgument)
End If
End Sub
Private Sub Load_Data_To_TextBox(ByVal index As Integer)
'Get data using index of clicked row and show it in textbox
End Sub
If you are not clear with aspx code then please post your aspx grid code also. I will give aspx code also.