Its organized like this:
Code: Select all
Level 1 (Company owner)
Image control with the owners' photo
Display only Text field with the owners' name
Level 2 (Nested Repeater)
Image control with the persons' photo
Display only Text field with an employees' name
Level 3 (Nested Repeater)
Image control with the persons' photo
Display only Text field with an employees' name
Level 4 (Nested Repeater)
Image control with the persons' photo
Display only Text field with an employees' name
I also have logic in the before page event to loop through each repeater and dynamically load the user image.
For Level 2, I do
Code: Select all
allRows=tables.LEVEL2;
rows=allRows.getRows();
while (rows.next()) {
controls.USERIMAGE2.setImageURL(userImagePath);
}
Code: Select all
allRows=tables.LEVEL3;
rows=allRows.getRows();
while (rows.next()) {
var parentRow=tables.LEVEL2.findRow(tables.LEVEL2.Realname,allRows.ReportsTo.value);
if (parentRow != -1) {
tables.LEVEL2.setCurrentRow(parentRow);
}
controls.USERIMAGE3.setImageURL(userImagePath);
}
Code: Select all
allRows=tables.LEVEL4;
rows=allRows.getRows();
while (rows.next()) {
var parentRow=tables.LEVEL3.findRow(tables.LEVEL3.Realname,allRows.ReportsTo.value);
if (parentRow != -1) {
tables.LEVEL3.setCurrentRow(parentRow);
}
controls.USERIMAGE4.setImageURL(userImagePath);
}
I noticed that doing controls.USERIMAGE4.setHidden(true) does not seem to hide the image control which makes me think that I am not working on the correct repeater row.