Free Support Forum - aspose.com

How to change the border of particular cell in a row

How to change the border of particular cell in a row? Need coding help…


row2b.Cells.Add(“Site :”);
row2b.DefaultCellTextInfo.FontSize = 10;
row2b.Cells.Add("");//*****I want to set the border of that cell only
Aspose.Pdf.Generator.Cell cell2b = row2b.Cells[1];
cell2b.ColumnsSpan = 2;
cell2b.BackgroundColor = new Aspose.Pdf.Generator.Color("#FFFFFF");

row2b.Cells.Add("");
row2b.Cells.Add("");

Hi,

Please see the following sample code to setup the border of a particular cell using Aspose.Pdf for .NET.

row2b.Cells.Add("Site :");<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

row2b.DefaultCellTextInfo.FontSize = 10;

row2b.Cells.Add("");//*****I want to set the border of that cell only

Aspose.Pdf.Generator.Cell cell2b = row2b.Cells[1];

cell2b.ColumnsSpan = 2;

cell2b.BackgroundColor = new Aspose.Pdf.Generator.Color("#FFFFFF");

BorderInfo border = new BorderInfo();

border.SetBorderStyle((int)BorderSide.Box,

Aspose.Pdf.Generator.BorderStyle.Normal);

cell2b.Border = border;

If you have any further query, please feel free to contact support.

Thank You & Best Regards,