04-24-2015, 03:32 PM
How is the data in the DataGridView stored? Is it stored using a DataSource or simply being directly added into the DataGridView? If you're using a datasource, filtering becomes fairly easy, as you can do something like this:
If you're just inputting things in the Data Grid View direclty, I think you will need to go through every row, check to see if the column is equal to the textbox value, and eliminate those that are not equivalent.
Code:
CType(dgv.DataSource, DataTable).DefaultView.RowFilter = TextBox1.Text
dgv.Refresh()
If you're just inputting things in the Data Grid View direclty, I think you will need to go through every row, check to see if the column is equal to the textbox value, and eliminate those that are not equivalent.