Including Subheadings in a Datagrid

Friday Jul 25th 2003 by DatabaseJournal.com Staff
Share:

Oftentimes, the data displayed in a DataGrid can be logically grouped in some manner. For example, in the Northwinds database's Products table, each product belongs to precisely one product category. We can improve the DataGrid UI by showing how these FAQs or products are grouped by category. This article examines how to display a DataGrid so that its data is grouped by category, with a subheading inserted between each new category.

[From ASP.NET.4GuysFromRolla.com]

Introduction
I short while ago I was tasked with adding subheadings into a datagrid, something I have not tried to do, or even thought of doing prior to this assignment. Thus, the task was a little bit beyond my skillset. Having searched around the net for examples, I came up dry. I eventually solved this problem, so I thought I'd share with you how I accomplished adding subheadings to a DataGrid.

First, let me define what I mean by subheadings. Oftentimes, the data displayed in a DataGrid can be logically grouped in some manner. For example, in Scott Mitchell's An Extensive Examination of the DataGrid Web Control, Scott displays the FAQs from the ASPFAQs.com database. Each of these FAQs belongs to precisely one FAQ category. In the Northwinds database's Products table, each product belongs to precisely one product category. In both of these examples, we can improve the DataGrid UI by showing how these FAQs or products are grouped by category.

The article continues at http://aspnet.4guysfromrolla.com/articles/072603-1.aspx

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved