Ahh... perhaps I spoke too soon :-) Sounds like you're making it
too hard anyway. If you have something like the following life
will be easy...
ColsRepetition : WORepetition {
list = recordsPerColumn;
item = rowsForColumn;
index = columnIndex;
}
RowsRepetition : WORepetition {
list = rowsForColumn;
item = rowItem;
index = rowIndex;
}
WORepetition will increment columnIndex and rowIndex for you.
Are you saying I should be able to make the columns repetitions too?
That's an option. If not, then you can increment columnIndex like so:
private int colIndex = 0;
private int rowIndex = 0;
public int colIndex() { return this.colIndex; }
public int rowIndex() { return this.rowIndex; }
public void setRowIndex( int num )
{
this.rowIndex = num;
if ( rowIndex() == 0 )
this.columnIndex = 0;
else if ( rowIndex() % COLS_PER_ROW == 0 )
this.columnIndex++;
}
What about the headers in the table? Actually I'm not sure this
will work anyway since I also have some cells that are conditional
and show other contents at times.
WOConditional's inside WORepetitions are allowed :-)