D
Daves
I have a asp:Table (with visible="false") which I use as a "template" for tr
& td data it contains to copy the layout to another Table which contains
multiple rows and is visible. When I have created a TableRow instance from
the template table and add it to the main table, the TableRow items are
removed from the template table so that I cannot use it next time the loop
iterates?!
while (_sqlDataReader.Read())
{
TableRow _tableRow = TableItems.Rows[0];
... code which fills in custom values to the TableRow controls ...
TableMain.Rows.Add(_tableRow);
}
In VS debugger I see that in the bottommost 2 lines the TableMain.Rows.Count
decreases from 1 to 0! What am I doing wrong?? I thought I was working with
a copy of the row template?!
& td data it contains to copy the layout to another Table which contains
multiple rows and is visible. When I have created a TableRow instance from
the template table and add it to the main table, the TableRow items are
removed from the template table so that I cannot use it next time the loop
iterates?!
while (_sqlDataReader.Read())
{
TableRow _tableRow = TableItems.Rows[0];
... code which fills in custom values to the TableRow controls ...
TableMain.Rows.Add(_tableRow);
}
In VS debugger I see that in the bottommost 2 lines the TableMain.Rows.Count
decreases from 1 to 0! What am I doing wrong?? I thought I was working with
a copy of the row template?!