Filtering Custom Paged Results 04 Apr 2007 00:00 GMT
The ASP.NET 2.0 data web controls - the GridView, DetailsView, and FormView - all provide built-in paging support that can
be enabled at the tick of a checkbox. Unfortunately, this built-in paging support is very inefficient when paging through
large amounts of data since it naively grabs all of the records from the data being paged through even though only
a subset of the records are displayed. Consequently, when paging through several hundred or thousands of records, it behooves
you to implement custom paging. With custom paging, the data Web control hands over its paging responsibilities to us,
the page developer. We are tasked with efficiently grabbing the precise subset of records to display and providing this
information to the data Web control.
Previous articles here on 4Guys have looked at implementing custom paging in ASP.NET 2.0. In
Custom Paging in ASP.NET 2.0 with SQL Server 2005 we
looked at using a GridView, a Typed
DataSets, an ObjectDataSource control, and
SQL Server 2005's new ROW_NUMBER() keyword
to efficiently page through 50,000 records 10 at a time. Another article, Sorting
Custom Paged Results, looked at a technique for efficiently sorting the custom paged results.
In addition to paging and sorting, another common data request is filtering. When using the inefficient default paging,
filtering is easy to implement but includes the same inherent inefficiencies: the data Web control retrieves all of
the filtered records even though only a subset of them are displayed on each page. It is possible to implement filtering
with custom paging and sorting, however. In this article we will look at extending the custom paging and sorting example -
which currently pages and sorts through the 50,000 employees in a fictional company - to include the ability to filter the
displayed employees by their department. Read on to learn more!
Before tackling this article make sure you have read and worked through Custom Paging in ASP.NET 2.0 with SQL Server 2005
and Sorting Custom Paged Results...
Read More >
Source: 4GuysFromRolla Microsoft Developers: Take Our Code Quality Test 02 Apr 2007 20:34 GMTMicrosoft .NET developers certainly have a plethora of tools from which to choose, and if you use Visual Studio, using these automated tools that safeguard your code's quality can be as easy as selecting a menu option. For example, Compuware's DevPartner Studio can be accessed directly from within Microsoft Visual Studio to give you an early view of a multitude of performance issues you may not even know to look for.
Source: DevX