I am attempting to create a table using the rowspan property, but the last row vanishes whenever I set rowspan.
I need the table to look like this:
______
| |_|_|
| |_|_|
|__|_|_|
|__|_|_|
I keep getting this:
______
| |_|_|
| |_|_|
|__|_|_|
The fourth row won't show up. I'm not sure what I'm doing wrong, and can't find any documentation on how to use the rowspan property.
Here is the code: (width and height are set prior to this)
---------------------------------------------------
Table titleBlock = new Table(0, 0, width, height);
titleBlock.Columns.Add((float)(width * 0.30));
titleBlock.Columns.Add((float)(width * 0.19));
titleBlock.Columns.Add((float)(width * 0.51));
Row row1 = titleBlock.Rows.Add((float)(height * 0.25), Font.HelveticaBold, 16, Grayscale.Black, Grayscale.White);
//row1.Align = CellAlign.Center;
//row1.VAlign = CellVAlign.Center;
row1.Cells.Add("A1", Font.HelveticaBold, 6, 1, 3);
row1.Cells.Add(" B1 ", 1, 1);
row1.Cells.Add(" C1 ", 1, 1);
Row row2 = titleBlock.Rows.Add((float)(height * 0.25), Font.HelveticaBold, 16, Grayscale.Black, Grayscale.White);
//row2.Align = CellAlign.Center;
//row2.VAlign = CellVAlign.Center;
row2.Cells.Add("B2 ", 1, 1);
row2.Cells.Add(" C2 ", 1, 1);
Row row3 = titleBlock.Rows.Add((float)(height * 0.25), Font.HelveticaBold, 16, Grayscale.Black, Grayscale.White);
//row3.Align = CellAlign.Center;
//row3.VAlign = CellVAlign.Center;
row3.Cells.Add(" B3 ", 1, 1);
row3.Cells.Add(" C3", 1, 1);
Row row4 = titleBlock.Rows.Add((float)(height * 0.25), Font.HelveticaBold, 16, Grayscale.Black, Grayscale.White);
//row4.Align = CellAlign.Center;
//row4.VAlign = CellVAlign.Center;
row4.Cells.Add(" A4 ", 1, 1);
row4.Cells.Add(" B4 ", 1, 1);
row4.Cells.Add(" D4 ", 1, 1);
---------------------------------------------------
If I change the rowspan of the first cell to 4 instead of 3, and remove the "A4" cell, the fourth row will display. Is this a bug, or something I'm doing incorrectly? Is there any detailed documentation on how to use the "rowspan" property?
Thanks!