Visual Basic: DataRepeater Control

RepeaterBinding Object Example

The example below first prints the existing property names of the RepeaterBindings collection, then adds a DataBinding object to the collection, and finally changes the format of a DataBinding object.

  Private Sub DataRepeater1_RepeatedControlLoaded()
   Dim rb As RepeaterBinding
 
   For Each rb In DataRepeater1.RepeaterBindings
      Debug.Print rb.PropertyName ' Print all property names.
   Next
 
   With DataRepeater1
      ' Add a new RepeaterBinding object.
      .RepeaterBindings.Add "cleared", "cleared"
      ' Change the Format to all caps.
      .RepeaterBindings(2).DataFormat.Format = ">"
   End With
End Sub