I am adding texboxes into a table (type Table) but I can't add them. I can't add more than one cell to each row, any idea?
TextBox[] tx = new TextBox[10];
TableCell[] tc = new TableCell[10];
TableRow[] tr = new TableRow[10];
for (int i = 0; i < 10; i++)
{
tx[i] = new TextBox();
tc[i] = new TableCell();
tc[i].Controls.Add(tx[i]);
}
for (int i = 0; i < 10; i++)
{
tr[i] = new TableRow();
tr[i].Cells.Add(tc[i]);
}
for (int i = 0; i < 10; i++)
Table1.Rows.Add(tr[i]);
It comes out like 10 rows each having only 1 cell