Public Class frmBerechtigungenUser
    Private Sub cb_inaktivAusblenden_CheckedChanged(sender As Object, e As EventArgs) Handles cb_inaktivAusblenden.CheckedChanged

        If gdvGruppen IsNot Nothing AndAlso gdvGruppen.Rows.Count > 0 Then

            If cb_inaktivAusblenden.Checked Then
                For Each row In gdvGruppen.Rows

                    If row.Cells("Inaktiv").Value Then
                        row.Visible = False
                    End If

                Next

            Else
                For Each row In gdvGruppen.Rows

                    row.Visible = True

                Next

            End If

        End If

    End Sub
End Class