Filtering a DataGridView

furjaw

Member
Joined
Jun 10, 2006
Messages
17
Programming Experience
Beginner
Visual Basic.Net:

I have a DataGridView in Last Name sequence.
Is it possible to when a user types the first letter of a last name
that it displays all rows with last names that start with that letter.
When he types the second letter, it displays all records whose last name starts with those 2 letters, etc.?
 
You really know your ****!

VB.NET:
Private Sub LastNameTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LastNameTextBox.TextChanged
         PatientBindingSource.Filter = "LastName Like '" & LastNameTextBox.Text & "*'"
End Sub
 
Last edited by a moderator:
Back
Top