Hi,
I am adding a Table in the document that has the Default Borders (1 pt Solid).
On some rows I have 2 cells and need to remove the internal borders of those cells.
I tried with this code:
r = tbl.AddRow(false);
r.HeightType = TableRowHeightType.AtLeast;
r.Height = 20f;
r.RowFormat.Borders.Bottom.BorderType = BorderStyle.None;
r.RowFormat.Borders.Bottom.LineWidth = 0f;
r.Cells.Clear();
r.AddCell(false);
r.AddCell(false);
r.Cells[0].Width = 200f;
r.Cells[1].Width = w - 200f;
r.Cells[0].CellFormat.Borders.Right.BorderType = BorderStyle.None;
r.Cells[0].CellFormat.Borders.Right.LineWidth = 0f;
r.Cells[0].CellFormat.Borders.Bottom.BorderType = BorderStyle.None;
r.Cells[0].CellFormat.Borders.Bottom.LineWidth = 0f;
r.Cells[0].CellFormat.Borders.Top.BorderType = BorderStyle.None;
r.Cells[0].CellFormat.Borders.Top.LineWidth = 0f;
r.Cells[1].CellFormat.Borders.Left.BorderType = BorderStyle.None;
r.Cells[1].CellFormat.Borders.Left.LineWidth = 0f;
r.Cells[1].CellFormat.Borders.Bottom.BorderType = BorderStyle.None;
r.Cells[1].CellFormat.Borders.Bottom.LineWidth = 0f;
r.Cells[1].CellFormat.Borders.Top.BorderType = BorderStyle.None;
r.Cells[1].CellFormat.Borders.Top.LineWidth = 0f;
I repeated this for some rows but the borders are present on those cells.
The same operation works with the property pages inside Word.
Have I done something wrong?
There is a workaround for this (I have not tried the conversion to pdf that will be the final format of the document generated).
Thanks in advance
Andrea Perazzolo