This document discusses filtering records in a table using VB.NET. It shows code for filtering a student data table to only display records where the internal mark is greater than 30 when a search button is clicked. It also shows code for filtering the student data table to only display the record where the student ID matches the ID entered in a textbox when a filter button is clicked.
Convert to study materialsBETA
Transform any presentation into ready-made study material—select from outputs like summaries, definitions, and practice questions.
2. Dr. Girija Narasimhan 2
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
StudentDataGridView.Visible = True
StudentBindingSource.Filter = "internal > ' " & 30 & " ' "
End Sub
Search button
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
StudentDataGridView.Visible = True
StudentBindingSource.Filter = "sId = ' " & TextBox1.Text & " ' "
End Sub
Filter Button