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

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.
Posted

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.
Example:
myDataSet.FilterExpression = "Column1 LIKE '%' + searchTextBox.Text + "%'";
 
Share this answer
 

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