.NET中为什么动态给表格添加内容只能添加一行?
TableRow st = new TableRow();
TableCell[] stu = new TableCell[] { new TableCell(), new TableCell(), new TableCell(), new TableCell(), new TableCell() };
stu[0].Text = cla;
stu[1].Text = cour;
stu[2].Text = tea;
stu[3].Text = room;
stu[4].Text = num;
for (int i = 0; i < 5; i++)
{
st.Cells.Add(stu[i]);
}
this.Table1.Rows.Add(st);