Just about any control can be placed onto a DataRepeater but what is important is the design and flow of the data and controls.
A quick flow might go something like this (VS2008). Hopefully you can follow this code and get what you need for your project. My advice is always if possible learn how to use a control prior to using it in a project. Best to learn without the deadline of a project and do it at your own pace.
Load data, in this case from XML and setup databindings to two textboxes.
Code:
Public Class Form_Vertical
Private CustomerView As New DataView
Code:
Private Sub LoadData()
Dim Customers = ( _
From customer In XDocument.Load("..\..\..\XML_Data\Customers.xml")...<Customer> _
Select Identifier = customer.<CustomerID>.Value, _
CompanyName = customer.<CompanyName>.Value, _
Address = customer.<Address>.Value, _
City = customer.<City>.Value, _
Country = customer.<Country>.Value).ToDataTable.AsDataView
txtIdentifer.DataBindings.Add(New Binding("Text", Customers, "Customers.Identifier"))
txtCompanyName.DataBindings.Add(New Binding("Text", Customers, "Customers.CompanyName"))
CustomerRepeater.DataSource = Customers
CustomerView = DirectCast(CustomerRepeater.DataSource, DataView)
CustomerView.Sort = "Identifier"
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
LoadData()
End Sub
Also on the DrawItem event of the DataRepeater you can do additional work, in this case show an image based on a condition.
Code:
Private Sub CustomerRepeater_DrawItem(ByVal sender As Object, _
ByVal e As Microsoft.VisualBasic _
.PowerPacks.DataRepeaterItemEventArgs) _
Handles CustomerRepeater.DrawItem
If CustomerView.Count = 0 Then
Exit Sub
End If
Dim currItem As DataRowView = CustomerView(e.DataRepeaterItem.ItemIndex)
If e.DataRepeaterItem.ItemIndex Mod 2 = 0 Then
e.DataRepeaterItem.BackColor = Color.FromArgb(213, 224, 211)
Else
e.DataRepeaterItem.BackColor = SystemColors.Control
End If
If currItem("Country").ToString = "Germany" Then
DirectCast(e.DataRepeaterItem.Controls("PictureBox1"), PictureBox).Image = My.Resources.blue
Else
DirectCast(e.DataRepeaterItem.Controls("PictureBox1"), PictureBox).Image = My.Resources.green
End If
End Sub
If you need to get data from the current row
Code:
Private Sub cmdGetCurrent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGetCurrent.Click
Dim CompanyName As String = CustomerRepeater.CurrentItem.Controls("txtCompanyName").Text
Dim Identifer As String = CustomerRepeater.CurrentItem.Controls("txtIdentifer").Text
MsgBox(String.Format("You are on the Company '{0}' Key '{1}'", CompanyName, Identifer))
End Sub