asp.net.ph

DataList.RepeatColumns Property

System.Web.UI.WebControls Namespace   DataList Class


Sets or retrieves the number of columns to display in a DataList control.

Syntax


Inline <asp:datalist repeatcolumns = intSize ... >
Script DataList.RepeatColumns = intSize

Property Value


intSize The number of columns to display in the DataList control.

The property is read/write with a default value of 1.

Exceptions


Exception Type Condition
ArgumentOutOfRangeException The given number of columns is set to a negative value.

Remarks

Use this property to specify the number of columns in which to display the items in the DataList control. For example, if you set this property to 3, the DataList displays its items in three columns.

NOTE: If this 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.

Example

The following example demonstrates dynamically setting the RepeatColumns property of a DataList at run time, based on user input.

 Show me 

See Also

DataList Members   RepeatDirection   RepeatLayout Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph