Click here to Skip to main content
15,302,644 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

This is Tarun.

May I Know how to search a row in a Datagridview after inserting text in textbox and

selecting a item in combobox.

1 solution

Do you need just to highlight the row which apply the conditions or to filter your grid - I mean to leave only those rows in it that apply the conditions?

If second - it actually depends on the source of your data grid.
If it's some DataSet object - you can use its FilterExpression property and set it to some SQL-like expression which filter the result set.
myDataSet.FilterExpression = "Column1 LIKE '%' + searchTextBox.Text + "%'";

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900