hub.eb?material_id=84&track_id=264

Interact with Controls inside a Repeater


Controls inside a Repeater Row Control are bound to the table row that it represents. By iterating over the rows in the Table in a server-side event, the Controls in a Repeater Row Control can be interacted with via the Verj.io JavaScript API.

For example, a Repeater Control has a Button Control called myButton contained in its Repeater Row Control and at runtime we want to update the text of these buttons to the value in the Table Column myColumn at each row, we could use the following code in the Repeater Control's Before Control event:

// Get the Row Iterator for myTable
var rows = tables.myTable.getRows();

// Iterate over the all the Rows in myTable.
while (rows.next()) {

  // Update the text of the Button Control myButton inside the Repeater Row Control represented by this row.
   controls.myButton.buttonText.text = tables.myTable.myColumn.value;
}

This is a simple example, but the principle allows for unlimited data-driven formatting of table row data.

Current Module

Related