Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[VB.NET] nur Markierte Felder anzeigen lassen

Empfohlene Antworten

hallo,

ich hab da eine kleine frage.

und zwar hab ich ein datagrid und füre da eine suche durch. das suchergebniss wird im grid rot markiert.

jetzt meine frage, wie bekomme ich das hin, das mir im grid nur noch die markierten felder angezeigt werden?

die suchfunkion sieht so aus:

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click


        For Each Iterrow As DataGridViewRow In DataGridView1.Rows

            For Each c As DataGridViewCell In Iterrow.Cells

                If c.Value IsNot Nothing AndAlso c.Value.ToString.Contains(TextBox_suche.Text) Then

                    c.Style.BackColor = Color.Red

                    DataGridView1.Focus()

                    DataGridView1.Rows(0).Selected = False

                Else

                    c.Style.BackColor = Color.White

                End If

            Next

        Next


    End Sub

ich hoffe, jemand hat da ne idee.

ich danke schon mal

gruß michael

Hi Michael,

Einzelne Zellen ausblenden ist meines Wissens nicht möglich.

Aber du kannst die übergeordnete Zeile so ausblenden:

DataGridView1.Rows.Item(c.RowIndex).Visible = true/false

Hoffe ich konnte helfen

ToolsDevler

ich danke dir und werds mal testen.

gruß michael

ps: es hatte leider nicht den gewünschten effekt :(

Bearbeitet von Michael_M

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.