Click here to Skip to main content
15,903,736 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Filtering the values using pattern matching in Datagridview using C# in an winform application.

For Example:
I have one textbox and one Datagridview that grid contains three values like X,Y,Z .if i enter Z on the textbox the grid shows only Z.

Help pls..

Thanks in advance...
Posted
Updated 7-Nov-11 1:54am
v5

1 solution

The best way to do this is to filter your data that is being bound to the datagridview. Say if your DataGridView is populated with a list of strings, then you could use LinQ to select only the strings containing 'Y' and the rebind the datagridview to the filtered selection.
 
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