vb.nette parametre kullanarak datagridviewde arama nasıl yapılıyor
Moderatör tarafında düzenlendi:
Follow along with the video below to see how to install our site as a web app on your home screen.
Not: This feature may not be available in some browsers.
Private Sub t1_TextChanged(sender As System.Object, e As System.EventArgs) Handles t1.TextChanged
For Each row As DataGridViewRow In d1.Rows
For Each cell As DataGridViewCell In row.Cells
If Not IsNothing(cell.Value) Then
If cell.Value.ToString.StartsWith(t1.Text, StringComparison.InvariantCultureIgnoreCase) Then
t1.ForeColor = Color.Green
cell.Selected = True
d1.CurrentCell = d1.SelectedCells(0)
Else
t1.ForeColor = Color.Red
d1.ClearSelection()
End If
End If
Next
Next
If t1.Text = "" Then
d1.ClearSelection()
End If
End Sub