Using the .NET DataView Object
by Kevin Koch

Using the .NET DataView Object

When building database driven web applications, presentation of data becomes a key component in your web forms. The common problem that arises is that no two users want to view their data the same way. One user wants to see only certain data; another user wants the data sorted by date ascending while another may only want to see data from the past week. The possibilities are literally endless.

As a developer, how do you cover all the scenarios? The answer is you really can’t, what you can do however is offer enough flexibility in data filtering to allow the user to customize their presentation themselves. And depending on what components you are implementing in your application, the DataView object is a good solution to provide this type of filtering.

In this tutorial we’ll look at a basic ASP.NET application that implements data column filtering as well as row state filtering. We’ll use a DataGrid component to search a column for data that matches a search pattern, thus filtering the user’s view. And we’ll also see how we can use the DataView to show only newly added rows; a pattern which can also be applied to edited or deleted rows easily.

We’ll need a sample database to work with so we’ll use the Northwind database which comes with all versions of SQL server, including MSDE. If you do not have access to SQL server you can simply link the tutorial example to any database of your choice and skip the database configuration section.

Note: Visual Studio .NET running ASP.NET 1.1 is required for this tutorial. Both VB.NET and C# code samples will be provided.

- OR -

Kevin Koch

Kevin KochKevin Koch is a senior software engineer with over 8 years experience designing and architecting primarily web based applications. Fresh out of college during the nineties he co-founded Task Solutions and developed several projects with the then popular classic ASP.

During the Dot Com boom Kevin left his position as president and joined a new venture to build an enterprise insurance claim system build upon J2EE technology. After the Dot Com crash Kevin schooled himself to become an expert with .NET technology and is currently freelancing his ASP.NET skills to build enterprise n-tier frameworks using advanced OO methodologies.

See All Postings From Kevin Koch >>

Place your review about Using the .NET DataView Object

You must me logged in to write a review

Be the first to place a review