Hello,
I am trying to set different borders on a table, and there seems to be no difference between single, thick, and hairline.
Here is a code example and attached is the code output. Can you confirm or explain how to set a thick border around the header row and different border styles for top and bottom and right and left?
var document = new WordDocument();
document.EnsureMinimal();
var table = document.LastSection.AddTable();
table.ResetCells(3, 4);
//table.TableFormat.Borders.BorderType = BorderStyle.None;
table.Rows[0].Cells[0].CellFormat.Borders.BorderType = BorderStyle.Single;
table.Rows[0].Cells[1].CellFormat.Borders.BorderType = BorderStyle.Single;
table.Rows[0].Cells[2].CellFormat.Borders.BorderType = BorderStyle.Single;
table.Rows[1].Cells[0].CellFormat.Borders.BorderType = BorderStyle.Thick;
table.Rows[1].Cells[1].CellFormat.Borders.BorderType = BorderStyle.Thick;
table.Rows[1].Cells[2].CellFormat.Borders.BorderType = BorderStyle.Thick;
table.Rows[2].Cells[0].CellFormat.Borders.BorderType = BorderStyle.Hairline;
table.Rows[2].Cells[1].CellFormat.Borders.BorderType = BorderStyle.Hairline;
table.Rows[2].Cells[2].CellFormat.Borders.BorderType = BorderStyle.Hairline;
Attachment:
SyncfusionReport_1d0fc0ac.zip