Hello mate,
I tried your code and it turns out that you have created only one
TableRow
object and used in all the iterations. So no matter how many time you add the same TableRow object in a Table it will consider it as one row, so here is what you should do if you want one TextBox in one row.
for (int i = 1; i <= number; i++)
{ tr = new TableRow();
create a new object of TableRow at the start of each iteration. it'll work.
Cheers, good luck