System.Web.UI.WebControls Namespace DataList Class
Specifies whether the DataList items are displayed vertically or horizontally.
Inline |
<asp:datalist repeatdirection = enumValue ... > |
Script |
DataList.RepeatDirection = enumValue |
The property is read/write with a default value of Vertical.
Use the RepeatDirection property to specify the display direction of the DataList control — whether the items in the DataList are displayed in horizontal or vertical order.
NOTE: If the RepeatColumns property is set to 0, the DataList displays its items in a single row or column, based on the value of the RepeatDirection property. If RepeatDirection is not set, or is set to Vertical, the items are displayed in a single column. If RepeatDirection is set to Horizontal, the items are displayed in a single row.
For more information, see the RepeatDirection enumeration.
The following example demonstrates dynamically setting the RepeatDirection of a DataList at run time, based on user input.
Show me
DataList Members DataList.RepeatColumns DataList.RepeatLayout Specifying List Direction in a DataList Control