Private Sub FilterExactName()
For i = 0 To DataGridView3.Rows.Count - 1
If Trim(UCase(DataGridView3.Rows(i).Cells(1).Value)) Like Trim(UCase(txtcollegename.Text)) Then
DataGridView3.Rows(i).Cells("sort").Value = "5"
DataGridView3.Rows(i).Cells(1).Style.BackColor = Color.Lime
End If
Next
End Sub
For i = 0 To DataGridView3.Rows.Count - 1
If Trim(UCase(DataGridView3.Rows(i).Cells(1).Value)) Like Trim(UCase(txtcollegename.Text)) Then
DataGridView3.Rows(i).Cells("sort").Value = "5"
DataGridView3.Rows(i).Cells(1).Style.BackColor = Color.Lime
End If
Next
End Sub
No comments:
Post a Comment