Class wwWebRepeater

The WebRepeater class provides a template driven repeatable display bound to a datasource. The repeater supports Cursors, Object Arrays and Object Collections for databinding.

Repeaters work by using templates for displaying content. It has an ItemTemplate, Alternating Item template footer and header templates which can in turn contain other controls, expressions and literal text.

<ww:wwWebRepeater runat="server" id="repItems" ItemChanged="repItems_ItemChanged" DataSource="tt_cust"> <HeaderTemplate> <h1>Customer List</h1> </HeaderTemplate> <ItemTemplate> Company: <ww:wwWebLabel runat="server" Text="hello" ControlSource="tt_cust.company"></ww:wwWebLabel> Name: <%= tt_cust.Careof %> <hr> </ItemTemplate> <FooterTemplate> <small>generated at: <%= DateTime() %></small> </FooterTemplate> </ww:wwWebRepeater>

Note:
In order for the ControlSource binding to work you have to call DataBind() on the repeater either explicitly or through the Page's DataBind() method. <%= Expression %> binding always works regardless of whether DataBind() was called or not.

Custom
  wwWebControl
    wwWebRepeater

Class Members

MemberDescription
ItemChanged Event that fires just after a new item has been loaded. You can hook this event to affect processing that occurs just before the data item is rendered.
ItemDataBind Event that is fired when an each item is databound in the ItemTemplate.
ItemPreRender Called just before a data item is rendered. This event occurs after control state - if any - has been restored
ActiveItemTemplate The currently active Item template instance while iterating over items. You can use this object in ItemDataBind() to grab the current template object if necessary.
DataSource The DataSource that is bound to this control. Can be a Cursor, Array of objects or a collection of Objects.
DataSourceType 1 - Cursor/Table
2 - One Dimensional Object Array
3 - Collection of Objects
IsAlternatingItem Flag that determines if during rendering an alternating item is active.
MaxItems Maximum number of items to display in this list. 0 means display all.
NoDataHtml Text string/html to display if there's no data to display, ie. the datasource contains no data.

Requirements



  Last Updated: 4/27/2008 | © West Wind Technologies, 2008