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

Difference between PdfLightTable and PdfGrid

I want to create a PDF file which contains a table. From the documentation I've seen that there are two classes: "PdfLightTable" and "PdfGrid". The API for these classes is very similar at a first glance.

Which of these two classes is (more) recommended to use? What are the benefits/drawbacks of one or the other. I've seen that the "PdfGrid" was later introduced than "PdfLightTable". Is PdfGrid therefore the more "modern" class and does "PdfLightTable" only exist more or less for backwards compatibility?

Thanks for tips and suggestions in advance!


5 Replies

SM Suresh M Syncfusion Team July 5, 2011 09:09 AM UTC

Hi Tomm,

Thank you for your interest in Syncfusion products.

The differences between the PdfLightTable and the PdfGrid is that,

- PdfGrid is supported in Silverlight environment, whereas PdfLightTable is not supported.
- PdfGrid is based on the cell model. It provides support for cell formatting, row and column spanning, and drawing nested tables in the PDF document. PdfLightTable is based on row model.

Advantages of the PdfLightTable
-It has various event handlers such as BeginPageLayout, EndPageLayout, BeginRowLayout, EndRowLayout that allows you to customize the table.

Please let us know if you have any questions.

Regards,
Suresh M




TJ Thomas Jechalik July 5, 2011 09:39 AM UTC

Hi Suresh, thanks for reply!

I'm still not sure what to use since I'm not in a Silverlight environment, so technically I could use both classes if I understand correctly. I have two more questions:

1) You mentioned that PdfGrid supports column and row span. Does that mean that PdfLightTable doesn't support it?

2) You said that PdfLightTable supports various customizations through event handlers. What kind of customizations are possible with PdfLightTable which are NOT possible with PdfGrid?

Basically I would like to use the more flexible class which offers more features and I'm not sure now which one to choose.


Thanks in advance!




SM Suresh M Syncfusion Team July 6, 2011 11:11 AM UTC

Hi Tomm,

Please find the details,

1.Yes, PdfLightTable does not support row spanning.
2.With PdfLightTable event handlers, you can customize each cell in the table, it allows you to insert images(by getting the cell bounds) into the cells of the row, to set MinimalHeight of a row, etc.

Please refer to the sample available in the link below.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=TableSample641579540.zip

Regards,
Suresh M




TJ Thomas Jechalik July 6, 2011 08:37 PM UTC

Hi Suresh,

thanks for the helpful informations! I will go with the PdfGrid (mainly because of its column and row span capabilities).




GM Geetha M Syncfusion Team July 11, 2011 03:33 AM UTC

Hi Tomm,

Thank you for the update.

Please let us know if you have any questions.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon