Repeater
Version:
The Repeater control is a container. You bind the Repeater control to a data source, and the Repeater control shows the items that the data source provides.
The Repeater control is different from other containers (such as the ListControl control) in these ways:
- The Repeater control does not render items.
- You can add and remove controls that show items client-side. This means that SPEAK does not have to reload the page when items are added or removed.
To use the Repeater control you must:
- Create a template in the core database for the items you want the Repeater control to display.
- Open the Design Layout of the _Standard Values of the template you created and add renderings to this layout.
- Create items based on this template in the core database. (You can use the Item Web API or Sitecore.Services.Client to create items if you need to do this programmatically.)
- Add a data source component to your page. This data source component must return the items you created.
- Bind the Items property of the Repeater control to the data source.
The Repeater control displays the items with the renderings you added to _Standard Values.
The Repeater control itself does not provide logic for adding and removing items, but you can add this functionality in page code.
Properties
Properties
| Name | Description | Default |
|---|---|---|
| Items | Points to the items the control shows. You can use the drop-down list to select a binding to another control. You typically select a binding to the items property of a data source component. |
Configuration
Configuration
You can create a configuration item for a Repeater control by creating an item based on the Repeater Parameters template.
The configuration item has these specific fields:
- Items
It inherits these fields:
- IsVisible
- AccessKey
- Tooltip
- Behaviors
- Id
If you have suggestions for improving this article, let us know!