for (int I = 0; I <= DS.Tables[ "name "].Rows.Count - 1; I++)
{
TabRow = new TableRow();
TabCell = new TableCell();
CheckBox myCheckBox = new CheckBox();
myCheckBox.Text = DS.Tables[ "name "].Rows[I][ "id "].ToString();
TabCell.Controls.Add(myCheckBox);
TabRow.Cells.Add(TabCell);
TabCell = new TableCell();
TabCell.Text = DS.Tables[ "name "].Rows[I][ "pname "].ToString();
TabRow.Cells.Add(TabCell);
myTable.Rows.Add(TabRow);
myTable.Rows.Add(TabRow);
}
------解决方案--------------------
Up