asp.net.ph

DataList.RepeatLayout Property

System.Web.UI.WebControls Namespace   DataList Class


Specifies whether the DataList items are displayed in a table or flow layout.

Syntax


Inline <asp:datalist repeatlayout = enumValue ... >
Script DataList.RepeatLayout = enumValue

Property Value


enumValue One of the RepeatLayout values.

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

Exceptions


Exception Type Condition
ArgumentException The given value is not one of the RepeatLayout values.

Remarks

Use the RepeatLayout property to specify whether the items in the DataList control are displayed in a table or inline with the document flow. If this property is not set, or is set to Table, the items in the list are rendered into an HTML <table> element. If this property is set to Flow, the items in the list are rendered as HTML <span> elements.

NOTE: The RepeatColumns property determines how many table columns or span elements are rendered for each row.

When the DataList control is displayed in a table, you can use the GridLines property to specify a grid line style.

For more information, see the RepeatLayout enumeration.

Example

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

 Show me 

See Also

DataList Members   RepeatDirection   RepeatColumns   Specifying List Direction in a DataList Control 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