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

PdfGrid Nested Tables

Thread ID:





102729 Feb 24,2012 04:04 PM UTC Feb 28,2012 10:11 AM UTC ASP.NET Web Forms (Classic) 2
Tags: PDF
Vinnie Pignataro
Asked On February 24, 2012 04:04 PM UTC

The documentation of the PdfGrid object states it supports drawing nested tables. However, I can't seem to find any examples showing how to do this. I need to create a table that has 7 columns for the header data. Then each row in this table may have detail data to be displayed as well. This is where the nested table comes into play. The real trick is if the header table or the detail table spill to the next page, the header table and detail table headings must print on the new page. Any help with this would greatly be appreciated.

Vinnie Pignataro
Replied On February 24, 2012 06:27 PM UTC

I have found some sample logic under the PdfGridFormatting Cell section of the help file. At this point I think I am set. Basically you need to create another PdfGrid, and set the column value equal to the new grid to create a nested table.

Geetha M [Syncfusion]
Replied On February 28, 2012 10:11 AM UTC

Hi Vinnie,

Thank you for your interest in Syncfusion products.

Yes. As you found out, the child grid should be assigned as the cell value. Following code snippet illustrates this:

PdfGrid childPdfGrid = new PdfGrid();
for (int i = 0; i < 5; i++)
PdfGridRow row = childPdfGrid.Rows.Add();
for (int j = 0; j < 5; j++)
row.Cells[j].Value = String.Format("Cell [{0} {1}]", j, i);

// Set the value as another PdfGrid in a cell.
parentGrid.Rows[0].Cells[1].Value = childPdfGrid;

You can get more information on this from the following documentation 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

or the page will be automatically redirected to 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