I need to pass a row of datagridview that is in Form 2 to Form 1 controls.
I open my form 1 :
- Dim f1 As New form1
- f1.MdiParent= Me
- f1.Show()
- Dim f2 As New form2
- f2.ShowDialog()
- f2.Dispose()
- Private Sub dgv1_CellContentDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgv1.CellContentDoubleClick
- If (e.RowIndex = -1) Then
- Return
- End If
- Dim dr As DataGridViewRow = dgv1.SelectedRows(0)
- Me.Hide()
- form1.Show()
- form1.txtID.Text = dr.Cells(0).Value.ToString()
- form1.txtNo.Text = dr.Cells(1).Value.ToString()
- End Sub
Thank you!!
Chandu KumawatPosted Mar 5, 2016, 12:26 AM