Public Class frmTableVorschau

    Private Sub MyDatagridview1_DataSourceChanged(sender As Object, e As EventArgs) Handles MyDatagridview1.DataSourceChanged
        lbl.Text = "Anzahl: " & MyDatagridview1.RowCount
        'MyDatagridview1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells
        MyDatagridview1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells
    End Sub

End Class