I found out that changing the int rows (4th element) doesn't affect the rows of a table that will be rendered. Only if I put a number larger than the number of rows I get an exception. This makes sense, but why not to get less rows rendered in case that int rows is less than my rows?
public void SetEdge(int clm, int row, int clms, int rows, Edge edge, BorderStyle style, Unit width, Color clr);
I create the rows using the following loop
Code:
for (int rows = 0; rows < Table1_1.Count; rows++)
{
row = table_1.AddRow();
row.HeadingFormat = true;
row.Format.Alignment = ParagraphAlignment.Center;
row.Format.Font.Name = "Arial";
row.Format.Font.Size = 6;
row.Format.Font.Bold = false;
if (rows % 2 != 0)
{
row.Shading.Color = TableBlue;
}
else
{
row.Shading.Color = TableGray;
}
row.Cells[0].AddParagraph(Table1_1[rows]);
row.Cells[0].Format.Alignment = ParagraphAlignment.Left;
row.Cells[1].AddParagraph(Table1_2[rows]);
row.Cells[1].Format.Alignment = ParagraphAlignment.Center;
}
where
Code:
List<string> Table1_1 = new List<string>();
filled with 14 elements
Furthermore if I render a second table on another position in the page, the first table becomes as its last row the header of the second. Is this a known (or not) bug, or am I messing around with something?
I can provide the solution if there is interest.