We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Table width

Hi,

I'm trying to restrict the horozontal width of a table. This post (http://www.syncfusion.com/support/forums/pdf-windows/46546/Table-sizes-and-alignment) made reference to a Width property, but it's not coming up for me.:

PdfLightTable table = new PdfLightTable();
table.Width = 200 (Fails, no such property)

Thanks
JC


1 Reply

PJ Priyadharshini J Syncfusion Team November 23, 2010 08:23 AM UTC

Hi James,

Thank you for your interest in syncfusion products.

To restrict the horizontal width of a table, we must specify the table width in the draw method. Kindly refer the code below. In this the width of the table is specified as half the page width.
PdfLayoutResult result = table.Draw(page, new RectangleF(10,60,page.Graphics.ClientSize .Width/2,0));

Kindly refer the sample in the link below:
forum97353-1159629789.zip

Please try this and let us know if you have any queries.

Regards,
priyadharshini


Loader.
Live Chat Icon For mobile
Up arrow icon