Private Sub ViewOrders(ByVal customerId As String)
' Show the CustomerOrders dialog, passing in the
' customer ID.
Dim co As CustomerOrdersForm = New CustomerOrdersForm
co.ShowDialog(customerId, Me, northwindDS)
End Sub
Private Sub dataGridView1_CellContentClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles dataGridView1.CellContentClick
' Show the customer order screen when the user clicks the link.
If e.ColumnIndex = 1 AndAlso Not dataGridView1.Rows(e.RowIndex).IsNewRow Then
Dim customerID As String = TryCast(dataGridView1.Rows(e.RowIndex).Cells("CustomerID").Value, String)
If Not (customerID Is Nothing) Then
Me.ViewOrders(customerID)
End If
End If
End Sub
beside this ,this is a example named as datagridview overview which maybe can help you