NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Specifying List Layout

By default, the DataList control displays a single column. However, you can specify any number of columns. Within the columns, you can specify how the items are ordered: vertically (the default) or horizontally. Vertical layout in three columns results in a layout such as the following:

A    D    G
B    E     H
C    F

Horizontal layout for the same items results in the following layout:

A    B    C
D    E     F
G    H

To specify column count and ordering:

  1. Set the DataList control's RepeatColumns property to the number of columns you want.
  2. Set the RepeatDirection property to Vertical or Horizontal. If you are setting the property in code, use the RepeatDirection enumeration, as shown in the following example:
    [Visual Basic]
    DataGrid1.RepeatDirection = RepeatDirection.Horizontal

See Also

Introduction to the DataList Web Control | Specifying List Format