![]() |
Web Development »
ASP.NET Controls »
Grid Controls
Intermediate
License: The Code Project Open License (CPOL)
GridView Multiple Filter AJAX ControlBy tawammarAn AJAX control to filter data in a GridView control by adding filters to the GridView at runtime. |
C# 1.0, C# 2.0, C# 3.0.NET 2.0, ASP.NET, Ajax, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.
I have uploaded the source code and a Flash video on how to use the control inside your web application, on my blog. To run the video, you have to have the 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.html.
I was looking for an ASP.NET 2.0 custom control that enables the user to filter data in a GridView control by adding filters to the GridView. Similar controls can be found in applications such as Microsoft BI Studio. So I decided to develop a web based control that will do such thing.
To use the control is very straightforward:
UpdatePanel and ScriptManager, you don't have to create a new UpdatePanel for the control.)

UpdatePanel for the GridView.GridView inside the AJAX UpdatePanel and specify the SQLDataSource for it.
Note: The control already has a ScriptManager, so you don't have to create one in your ASPX page.
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.
FilterDataSource() in the event handler tableFilter_OnRefresh() will apply the filter on the SqlDataSource1 that you have assigned to the GridView.| You must Sign In to use this message board. | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 14 Jun 2008 Editor: Smitha Vijayan |
Copyright 2008 by tawammar Everything else Copyright © CodeProject, 1999-2009 Web09 | Advertise on the Code Project |