Hi there,

I have lots of datagrids on one form. However, the datagrid controls are all on different tabpages and tablelayoutpanels.

How can i programmatically "pick" up all the datagrid in one form, even though they are child controls of other controls?

Code:
    For Each tabpg As TabPage In Me.tabStatus.TabPages
            For Each ctl As Control In tabpg.Controls
                If TypeOf ctl Is DataGridView Then
                    Dim dgv As DataGridView = ctl
                    If dgv.Columns.Count > 0 Then
                  'Do something
                    End If
                    dgv.ClearSelection()
                End If
            Next
        Next