Share via


General, DataList Properties Dialog Box

The General tab of the DataList Properties dialog box allows you to:

  • Specify how many columns the list has and whether they flow vertically or horizontally.

  • Specify whether you want to display the list in a table (for more precise control) or simply in the flow of the HTML document.

To access this dialog box

  1. In Microsoft Visual Web Developer, switch to Design view.

  2. Select or add from the Toolbox a DataList control.

  3. Right-click the DataList control and click Show Smart Tag.

    The DataList Tasks dialog box opens.

  4. Click Property Builder.

    The DataList Properties dialog box opens.

  5. Click the General tab.

Tasks

UI Elements

  • Show header
    Specifies whether to render a row with column headers. You can specify header content by creating a Header template, and specify the appearance of the header on the Format tab.

  • Show footer
    Specifies whether to render a row at the bottom of the columns with footer text. You can specify footer content by creating a Footer template, and specify the appearance of the footer on the Format tab.

Repeat layout

  • Columns
    Specifies how many columns should be displayed in the list. The default is 0. If you specify more than one column, you can also specify the direction in which elements are ordered in the columns.

  • Direction
    If the list has more than one column, specifies how elements are ordered between columns using the following settings:

    Setting

    Description

    Vertical

    Causes elements to flow down and then continue at the top of the next column (like newspaper columns).

    Horizontal

    Causes elements to be ordered left to right, and then continue on the next line down (like days in a calendar).

  • Layout
    Specifies one of the following display modes:

    Setting

    Description

    Table

    List items are rendered in an HTML table, which gives you more facilities for specifying the look of items, because it allows you to set properties for table cells, such as gridlines.

    Flow

    List items are rendered inline, in the fashion of a word-processing document. Flow layout uses HTML <SPAN> elements and is suitable for uncomplicated lists. However, some browsers do not support setting properties for <SPAN> elements.

See Also

Tasks

How to: Create Web Server Control Templates Using the Designer

Reference

DataList Web Server Control Overview

Concepts

ASP.NET Web Server Controls Templates