Table border

DynamicPDF Generator for .NET (v3 and older) Forum

 Feb 21 2011 10:53 AM
Hi,

I am evaluating your software to replace the one we are currently using. In a table I want to be able to set the top or bottom or side borders ON or OFF. Is there any way I can do this? Can this be done at the table level or do I need to do this at the cell level.

Thanks
 
 Feb 21 2011 1:28 PM
Posted by a ceTe Software moderator
Hello,

If you are evaluating v6.0 of DynamicPDF Generator, you can turn ON/OFF the borders of Table2 object using the following code.

To turn the borders OFF selectively

            table.Border.Left.LineStyle = LineStyle.None;
            table.Border.Right.LineStyle = LineStyle.None;
            table.Border.Bottom.LineStyle = LineStyle.None;
            table.Border.Top.LineStyle = LineStyle.None;

To turn all the borders OFF
           
table.Border.LineStyle = LineStyle.None;


If you have defined the borders to the cells then they will be visible once the table borders are turned off. So in order to turn off the cell border you can use the same properties on the Cell2 object.

            cell.Border.Left.LineStyle = LineStyle.None;
            cell.Border.Right.LineStyle = LineStyle.None;
            cell.Border.Bottom.LineStyle = LineStyle.None;
            cell.Border.Top.LineStyle = LineStyle.None;

            cell.Border.LineStyle = LineStyle.None;

You can also set the Column2 objects CellDefault borders to control the cell borders at column level.

            column1.CellDefault.Border.Left.LineStyle = LineStyle.None;
            column1.CellDefault.Border.Right.LineStyle = LineStyle.None;
            column1.CellDefault.Border.Bottom.LineStyle = LineStyle.None;
            column1.CellDefault.Border.Top.LineStyle = LineStyle.None;

            column1.CellDefault.Border.LineStyle = LineStyle.None;

Thanks,
ceTe software Support Team.
 Aug 13 2013 6:55 AM
How can this be achieved in version 7 ?
 Aug 13 2013 7:08 AM
Posted by a ceTe Software moderator
Hello,

You can use the above mentioned code with version 7 DynamicPDF Generator for .NET product API. You can refer documentation on Table2 class here.

Feel free to download fully functional evaluation edition of version 7 DynamicPDF Generator for .NET product from our website here.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 2:51 PM.