DataRepeater Control Sample

This sample demonstrates how to use the DataRepeater control to display weather forecast data from a database.

To get samples and instructions for installing them

  • Do one or more of the following:

    • On the Help menu, click Samples.

      The Readme displays information about samples.

    • Visit the Visual Studio 2008 Samples Web site. The most recent versions of samples are available there.

    • Locate samples on the computer on which Visual Studio is installed. By default, samples and a Readme file are installed in drive:\Program Files\Microsoft Visual Studio 9.0\Samples\lcid. For Express editions of Visual Studio, all samples are located online.

For more information, see Visual Studio Samples.

Security noteSecurity Note:

This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties.

To run this sample

  • Open the sample and press F5.

Demonstrates

This sample uses multiple DataRepeater controls to present weather forecast data in a format similar to what you might find on a Web site.

The DrawItem event is used to demonstrate how to customize the display of individual items, displaying or hiding fields depending on their values at run time. The DrawItem event is also used on Form2 to demonstrate how to display alternating background colors.

The LayoutStyle property is used on Form1 to demonstrate how to display a DataRepeater in both a vertical and horizontal orientation.

See Also

Tasks

Walkthrough: Displaying Data in a DataRepeater Control (Visual Studio)

Troubleshooting the DataRepeater Control (Visual Studio)

Concepts

Introduction to the DataRepeater Control (Visual Studio)

Change History

Date

History

Reason

July 2008

Added topic.

SP1 feature change.