System.Web.UI.WebControls Namespace
Specifies the direction in which items of a list control are displayed.
Member Name |
Description |
Horizontal |
The list items are rendered horizontally in rows from left to right, and top to bottom. |
Vertical |
The list items are rendered vertically in columns from top to bottom, and left to right ( default ). |
The RepeatDirection enumeration represents the different direction options in which the contents of a repeating list control, such as the DataList, CheckBoxList and RadioButtonList, can be displayed.
NOTE: The RepeatColumns property must be set to a value greater than 1 for this property to have any effect.
If this property is set to Vertical ( the default ), the items in the list are displayed in columns loaded top to bottom, then left to right, until all items are rendered. For example, if RepeatColumns is set to 3, the items are displayed in three columns, as in the following table.
If this property is set to Horizontal, the items in the list are displayed in rows loaded left to right, then top to bottom, until all items are rendered. For example, if the RepeatColumns property is set to 3, the items are displayed in rows of three items each, as in the following table.
The following example demonstrates dynamically setting the RepeatDirection of a DataList at run time, based on user input.
Show me
CheckBoxList.RepeatDirection DataList.RepeatDirection RadioButtonList.RepeatDirection RepeatLayout Enum