Share via


Borders, DataList Properties Dialog Box

The Borders tab of the DataList Properties dialog box allows you to specify the appearance of the table cells that the list uses to display information.

Note

The settings you make on this page apply when the DataList control's RepeatLayout property is set to Table. You can set the RepeatLayout property on the General tab.

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 Borders tab.

Tasks

UI Elements

Cell Margins

  • Cell padding
    The amount of space, in pixels, between the edge of a cell and the cell contents. Setting this property allows you to create a margin around the cell contents. This property has no effect if the DataList control is in flow layout mode.

  • Cell spacing
    The amount of space, in pixels, between cells. Setting this value to a value higher than zero separates the cells. The color of the space between the cells is determined by the DataList control's BackColor property, which you can set on the Format tab. This property has no effect if the DataList control is in flow layout mode.

Border Lines

  • Grid lines
    The direction in which interior lines (rules) are drawn in the list (horizontal, vertical, both, or neither). This property has an effect only in browsers that support HTML 4.0 or later.

    Note

    You cannot set the width of gridlines; they are always one pixel wide.

  • Border color
    The color in which the borders and gridlines (if applicable) are displayed. Click the ellipsis button ( VisualStudioEllipsesButton screenshot ) to display the Color Picker dialog box.

  • Border width
    The width, in units that you specify, of the border. This value does not affect the width of gridlines.

See Also

Tasks

How to: Create Web Server Control Templates Using the Designer

Concepts

ASP.NET Web Server Controls Templates

Reference

DataList Web Server Control Overview