I'm having an issue using the ColumnSpanfeature when building a table. Whenever I apply a ColumnSpan of more than 1 to the first cell of any row in the table it seems to push all the columns to the right of this cell into overflow. For example, the following displays as expected:
// Create the table
Table table = new Table(0, 220, 523, 520, Font.Helvetica, 8);
table.Padding = 2;
table.VAlign = VAlign.Top;
table.BorderWidth = 1;
table.RepeatRowHeaderCount = 1;
table.Columns.Add(251);
table.Columns.Add(20);
table.Columns.Add(42);
table.Columns.Add(70);
table.Columns.Add(70);
table.Columns.Add(70);
// Create the header
Row headerRow = table.Rows.Add(12, Font.HelveticaBold, 7, borderColour1, bgColour1);
headerRow.VAlign = CellVAlign.Center;
headerRow.Cells.Add("PRODUCT");
headerRow.Cells.Add("");
headerRow.Cells.Add("");
headerRow.Cells.Add("QUANTITY").Align = CellAlign.Right;
headerRow.Cells.Add("ALREADY PAID").Align = CellAlign.Right;
headerRow.Cells.Add("RELEASE FEE*").Align = CellAlign.Right;
However, changing the first cell of the headerRow sends the table screwy:
headerRow.Cells.Add("PRODUCT").ColumnSpan = 3;
headerRow.Cells.Add("QUANTITY").Align = CellAlign.Right;
headerRow.Cells.Add("ALREADY PAID").Align = CellAlign.Right;
headerRow.Cells.Add("RELEASE FEE*").Align = CellAlign.Right;
I can't for the life of me why this should go loopy.
Table columnspan issue
Re: Table columnspan issue
Support · Feb 7, 2007Hello,
We are not able to recreate the behavior using the code you posted. Can you please make sure that you are using the latest build DLL files from the web site? It is possible that this issue could have been resolved in the latest build DLL files. If you are using the latest build DLL files, let us know what build DLL files you are using?
Thanks,
ceTe Software Support Team
Re: Table columnspan issue
Forum member · Feb 12, 2007You were right - the problem fixed itself when built against 4.0.2.20 rather than 4.0.1.20.
Thanks!