How Do I?

[How Do I:] Use the Ability to Create Groups with the ListView Control for Different Data

By Chris Pels|23 minutes|
In this video Chris Pels will show how to group items when displaying data in a ListView control. First, see the basics of item layout in the ListView control with the LayoutTemplate and the ItemTemplate. Then, learn how the GroupTemplate relates to the LayoutTemplate and ItemTemplate within a ListView to establish a group of data. See how to use floating DIV elements to create a flexible tabular layout since any of the templates used with the ListView can contain any HTML. This provides significant flexibility in creating groupings of data using the ListView control. Finally, see some options for enhancing the look by manipulating the CSS styles used in the ListView templates and how to use the GroupSeparatorTemplate as well as the EmptyItemTemplate.

DOWNLOADS: Code (C#)|Code (VB)|MP3|MP4|WMV

This article was originally created on May 20, 2008

Author Information

Chris Pels

Chris Pels – Chris has been instrumental in the architecture, development, and implementation of a wide variety of business systems and databases as a technology consultant since 1986. He has extensive experience in business analysis, technical specifications, database design, several programming languages including C# and VB.NET, and statistical analysis. He holds a Ph.D. from The University of Michigan and has been a speaker at Microsoft TechEd, Microsoft DevDays, VSLive, numerous events in New England