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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataTable Trouble

Thread ID:





98491 Mar 4,2011 12:33 AM UTC Mar 8,2011 09:09 AM UTC ASP.NET Web Forms (Classic) 3
Tags: PDF
victor elizondo
Asked On March 4, 2011 12:33 AM UTC


I have a problem that I didn't contemplated.

If I write a DataTable in a PDF Sheet with the line below:

PdfLightTableLayoutResult result = table.Draw(page, new PointF(10, 100), format) as PdfLightTableLayoutResult;

It works wonderful until a row(s) (actually a cell(s)) in the DataTable has a very large value(s) (See the attached image).

I think that the code above splits the text of the dataset into the cell in a few lines in the PDF file, but if the text in this example in the datatable has a lot of cells with a lot of text ocurrs the error in the image.

What kind of solution do i need? Make the text tinyer? How can I do this?

Best Regards.


Geetha M [Syncfusion]
Replied On March 4, 2011 12:08 PM UTC

Hi Victor,

Thank you for your continued interest in Syncfusion products.

I am afraid that I am not able to reproduce the problem. I have placed the test sample in the following link:

Could you please try running it and send me the modified sample so that I can check and get back to you?


victor elizondo
Replied On March 4, 2011 06:02 PM UTC


Thanks for the answer. I've atteched the code where you can see the error.

It's due the couple of lines below:

format.Break = PdfLayoutBreakType.FitElement;
format.Layout = PdfLayoutType.Paginate;

If in the code that I send you comment that lines everything will works fine.

Now, I also including a image and i would like to know if it's posible that the datatable in the PDF file had the same distribution of the grid, because in the dataset all the columns has the same width and that's not correct.

Best Regards.


Geetha M [Syncfusion]
Replied On March 8, 2011 09:09 AM UTC

Hi Victor,

Thank you for the details.

I was able to reproduce the problem. It can be avoided by using PdfGrid. Following is the code snippet:

PdfGrid table = new PdfGrid();
table.DataSource = CreateDataTable();

table.Style.AllowHorizontalOverflow = true;
table.Columns[8].Width = 425;

PdfGridLayoutFormat format = new PdfGridLayoutFormat();
format.Break = PdfLayoutBreakType.FitElement;
format.Layout = PdfLayoutType.Paginate;

PdfGridLayoutResult result = table.Draw(page, new PointF(10, 100), format);

I have placed the modified sample in the following link:

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



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon