I can't insert a string before a datagridview How can I pass Form1..Form2..Form3 variable to datagridview?
I have a datagridview with the same name in multiple forms I need to get the values from them by changing the name "FORMNAMEXXXX".DataGridView1.CurrentRow.Cells(0).Value
Dim ownerType = Owner.GetType()
Dim formowner = ownerType.Name.ToString
Dim id As Integer = formowner.DataGridView1.CurrentRow.Cells(0).Value.ToString
but I have this error: 'DataGridView1' is not a member of 'String'
So in Form1 and Form2, you need to pass in the "owner" when you display Form3:
Now over in Form3, you can use the
.Ownerproperty to get a reference to either Form1 or Form2. Afterwards, you can SEARCH for that DataGridView "by name":