In the an application I’m working on it should be possible to dynamically add numbers to cells in a table. The user types for example nr 1, and then the number should increment by 1 in each cell (eg. cell1 = 1, cell2 = 2, cell3 = 3 and so on).
I guess I can use either a for-loop or a for-each loop, but what I need to know is how to step through the cells and adding new content to each of them?
By the way. I am using the Table Control (not “pure HTML”), and the table contains of 7 rows and two cols. I want it to loop through the cells as following:
: 1 : 2 :
: 3 : 4 :
: 5 : 6 :
and so on…
A foreach like like this should do the trick:
You must loop through your table’s controls to find the rows, and then in the rows you can find the cells in similar fashion.