Hi..
i want to search record in gridview..
search output must be as you type..meaning that every keypress in textbox must produce outcome (result)..
could anyone help me please.......
Search as you type in asp.net
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Vishal JadavRank #1,692 · 901 reputationPosted Aug 1, 2010, 11:57 PM EDT
Even i was facing same problem few days ago, coz i need to search in database which is a little time consuming, i thought its better to fine the perticular string in DATAGRIDVIEW.
I tried a lot and i got the solution at last.
In the Textchange event of ur searching textbox create a loop through rows of ur datagrid.
and try to find out using following method.
1. datagridview.rows[i].cells[0].value.contains(textToSearch) will give u text anywhere from ur cell
2. datagridview.rows[i].cells[0].value.startswith(textToSearch) will give u text starts with ur searching text
.
one more thing u need to do if u required is. try hiding those which fails in searching..
Be frank to ask anytime..
Best of luck..