I won't question you requirement for a solution. The previous comments cover the pros/cons of you current conditions and request adequately. But I have found myself in situations where modifications to existing code are limited by policy, management decisions or just because...
One can add all the DataGridViews to a collection (List(of datagridview)the list is not necessary but it is there to help if you need to). The list can be used to assign an event handler for the MouseDoubleClick event. Finally the event handler can then cast the Sender object as the datagridview that was double clicked. Below is a small code sample, create a new Form, add 6 Datagridview object to it. Place this code in the Class file. Hope this helps.
Public Class Form1
Structure myString
Private _stringValue As String
Public Property StringValue() As String
Get
Return _stringValue
End Get
Set(ByVal value As String)
_stringValue = value
End Set
End Property
Public Sub New(ByVal newValue As String)
_stringValue = newValue
End Sub
End Structure
Dim dgList As New List(Of DataGridView)
Dim list As New List(Of myString)
Public Sub New()
InitializeComponent()
makelists()
End Sub
Private Sub MakeLists()
'Setup ssome data to use
For i As Integer = 0 To 20
list.Add(New myString("String_data _ " & i.ToString))
Next
'Create a number of datagridviews
dgList.Add(DataGridView1)
dgList.Add(DataGridView2)
dgList.Add(DataGridView3)
dgList.Add(DataGridView4)
dgList.Add(DataGridView5)
dgList.Add(DataGridView6)
'Add handlers to datagridviews
For Each dg As DataGridView In dgList
dg.DataSource = list
AddHandler dg.MouseDoubleClick, AddressOf dgs_MouseDoubleClick
Next
End Sub
'Handle atagirdview doubleclick
Private Sub dgs_MouseDoubleClick(sender As Object, e As MouseEventArgs)
Dim dg As DataGridView = DirectCast(sender, DataGridView)
If dg.CurrentRow IsNot Nothing AndAlso dg.CurrentRow.Index > -1 Then
MessageBox.Show(dg.Name & " " & list(dg.CurrentRow.Index).StringValue)
End If
End Sub
End Class