string[] ValuesT = new string[] { code, name, age}; TableRow tRowT = new TableRow(); Table1.Rows.Add(tRowT); for (int T = 0; T < 3; T++) { TableCell tCellT = new TableCell(); tCellT.Text = "" + ValuesT[T] + ""; tRowT.Cells.Add(tCellT); }
foreach (TableRow row in Table1.Rows) { foreach (TableCell cell in row.Cells) { Button btn = new Button(); btn.Text = "Delete"; btn.Click += new EventHandler(BtnDelete_Click); cell.Controls.Add(btn); } }
foreach (TableRow row in Table1.Rows) { TableCell btnCell = new TableCell(); Button btn = new Button(); btn.Text = "Delete"; btn.Click += new EventHandler(BtnDelete_Click); btnCell.Controls.Add(btn); row.Cells.Add(btnCell); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)