Hi All,
I want to set only Top and Right border of cell.
I have written following code
Aspose.Pdf.Generator.Table ltable = new Aspose.Pdf.Generator.Table();
Row lRow = new Row(ltable);
Cell lCell = new Cell(lRow);
GraphInfo lGrInfo1 = new GraphInfo();
lGrInfo1.GraphBorder = new BorderInfo((int)BorderSide.Top, 0.5f, new Aspose.Pdf.Generator.Color("#3354a5"));
lCell.Border.Top = lGrInfo1;
GraphInfo lGrInfo2 = new GraphInfo();
lGrInfo2.GraphBorder = new BorderInfo((int)BorderSide.Right, 0.5f, new Aspose.Pdf.Generator.Color("#3354a5"));
lCell.Border.Right= lGrInfo2;
Text lText = new Text("Test");
lText.TextInfo.Alignment = AlignmentType.Center;
lCell.Paragraphs.Add(lText);
lRow.Cells.Add(lCell);
ltable.Rows.Add(lRow);
It is throwing error on line --> 'lCell.Border.Top = lGrInfo;' that Object reference not set to an instance of an object.
But the property Cell.Border.Top says 'Gets or Sets GraphInfo object that indicates the top border'. But it is throwing error when I try to Set the property.
Please suggest how to set only required borders of cell asap.
Regards,