Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
I
Introduction
Ajax Control that enables the user to filter the data within any Column inside a GridView.
The user can add multiple filters and can delete and existed one.
Source Code and Video
I uploaded the source code and a flash video for how to use the control inside your web application.
to run the video you have to have flash plug-in in your browser. drag and drop the SWF file inside your browser and it will run.
http://tawatech.blogspot.com/2008/06/aspnet-datagridview-ajax-data-filter.htmlBackground
I was looking for an ASP.net 2.0 custom control that enables the user
to filter the data in a GridView control by adding filters to the
GridView. The control can be found in applications such as Microsoft BI
Studio. So I decided to develop a web based control that will do such
thing.
Using the code
to use the control, it is a straightforward method:
1- Add web.config ajax tags to enable Ajax in your website.

2- Drag and Drop the filter control in your page. (note: the
control is already has Ajax UpdatePanel and ScriptManager, you don't
have to to create a new update panel for the control);
3- Drag and Drop UpdatePanel for the GridView
4- Place a GridView inside the Ajax UpdatePanel and specify the SQLDataSource for it.
note: The control already has ScriptManager, so you don't have to create one in your aspx page;
5- on Page_Load specify the DataSource and DataColumns for the Filter Control and specify the Event Handler method that will be called after adding or removing the filter.
-Calling the control method FilterDataSource() in the event handler tableFilter_OnRefresh() will apply the filter on the SqlDataSource1 that you assigned to the GridView.