Filterable Grid for ASP.NET
Aug 13, 2004
1 min read
.NET1.0
.NET1.1
VS.NET2002
VS.NET2003
VB
ASP.NET
Javascript
Windows
.NET
Visual-Studio
Dev
Intermediate

by Hemang Shukla
Contributor
Introduction
This article presents an ASP.NET DataGrid
with ability to filter based on column values.
Details
I tried to keep the code simple. This code uses JavaScript method filtergrid
to build QueryString for the URL. The datasource is filtered based on QueryString values.
In the code-behind file, the FillDataGridColumns
method creates the column headers with HTML textbox and button.
Scope of further development
- At present, this control handles
String
andDouble
datatypes only. It can be modified to handle other datatypes. - Filter works on single value only and can not search for multiple values.
All your suggestions and comments are welcome.
Conclusion
The use of basic JavaScript and code-behind file helps to enhance the functionality of the DataGrid
control.
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)