Click here to Skip to main content
16,021,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..
I want to search in a datagridview having lot of rows. When we enter search term in a textbox it will be compared to a particular column in the dgv in the textchanged event of textbox. Is there any string function in C# that works like the 'LIKE' operator in SQL?? Or how can I do it???

THANKS.
Posted

1 solution

Well, there are plenty of String methods to help you get similar functionality. Look for

Contains<br />
EndsWith<br />
Equals<br />
IndexOf<br />
IndexOfAny<br />
LastIndexOf<br />
LastIndexOfAny<br />
StartsWith<br />
SubString<br />


here[^] is the full doc
 
Share this answer
 
Comments
shaijuvjohn 7-Aug-10 0:55am    
Thanks..

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