#region 劃TABLE
Table newTable = Table1;
//準備資料列及資料儲存格
System.Web.UI.WebControls.TableRow testTableRow;
System.Web.UI.WebControls.TableCell testTableCell;
//newTable.ID = "newTable_1";// + tbcount.ToString();
newTable.Attributes["runat"] = "server"; //
//2列
for (int TR_i = 0; TR_i < str_date_rpt.Rows.Count + 2; TR_i++)
{
testTableRow = new TableRow();
//2格 >按照站別動態給格數
for (int Tc_i = 0; Tc_i < str_date_rpt.Columns.Count + 1; Tc_i++)
{
testTableCell = new TableCell();
testTableRow.Cells.Add(testTableCell);
}
newTable.Rows.Add(testTableRow);
}
//this.Table1.Controls.Add(newTable);
#endregion
沒有留言:
張貼留言