ASP.NET 2.0 Tutorials : GridView Filtering
In this tutorial you will learn how to add a filter to a Grid View Control, To modify the query with a parameterized filter, the WHERE Clause, Parameter properties, Parameter Value Editor and To test filtering.
Adding Filtering
If the developer wants to display only selected data in a page, the query for the SqlDataSource control will have to be modified. The first step in this process is to add a Textbox control where the users can enter the filter condition. The filter condition then becomes the parameterized filter (WHERE clause).
1. In the Toolbox, from the Standard folder, drag a TextBox control and a Button control onto the page.
2. The Button control is used only to post the page to the server.
3. In the Properties window for the TextBox control, set the ID property to StudentNametext.
4. Type Student Name or similar text before the text box to act as a caption.
5. In the Properties window for the Button control, change the Text property to Submit.
The query will now have to be modified to add the filter.
Read
More...
http://www.exforsys.com/content/view/1652/354/