Hi All,
I'm trying to create a table that has 2 columns and some number of rows. I would like to add an additional row at the end that is one cell which extends the entire row! I'll show you a simplified code. The problem is that the last row does not extend the entire table.
This is how it showing now:
┌────────┬────────┐
│..Column1...│..Column2..│
├────────┼────────┤
│..Column1...│..Column2..│
├────────┼────────┘
│..Merged.... │
└────────┘
This is how I would like it to be:
┌────────┬────────┐
│..Column1...│..Column2..│
├────────┼────────┤
│..Column1...│..Column2..│
├────────┴────────┤
│............Merged...............│
└─────────────────┘
Note: I tried to mess with width...etc. It didn't work for me.
private void Button1_Click(object sender, EventArgs e)
{
for (int i=1; i<2; i++)
addRow("Column1","Column2");
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell.Text = "Merged";
row.Cells.Add(cell);
myTable.Rows.Add(row);
}
private void addRow(string c1, string c2)
{
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell.Text = c1;
row.Cells.Add(cell);
cell = new TableCell();
cell.Text = c2;
row.Cells.Add(cell);
myTable.Rows.Add(row);
}