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

PdfGrid repeat first row across pages

I have a PdfGrid that I'm manually populating, not using DataTable, and I want the first row of the grid to repeat across pages. Is this possible to do without using a DataTable?

Thanks,
Brian

3 Replies

AS Abirami Selvan Syncfusion Team November 3, 2015 09:30 AM UTC

Hi Brain,
Thank you for contacting syncfusion support.
We can use PDF grid header to repeat the rows across all the pages. We have created the simple sample for your reference.
Please refer to the following code example:
//Create the pdfgrid

PdfGrid pdfGrid = new PdfGrid();

//Add grid columns

pdfGrid.Columns.Add(5);

//Add the header

PdfGridHeaderCollection headers=pdfGrid.Headers;

PdfGridRow[] header=headers.Add(1);

header[0].Cells[0].Value = "header cell 1";

header[0].Cells[1].Value = " header cell 2";

//enable the repeat header as true.

pdfGrid.RepeatHeader = true;
Please refer the sample:
http://www.syncfusion.com/downloads/support/forum/121003/ze/sample1550986484
Please try this and let us know if you need any further assistance.
Regards,
Abirami.


BS Brian Seelig November 3, 2015 03:30 PM UTC

This worked perfectly. Thank you,
Brian


AS Abirami Selvan Syncfusion Team November 4, 2015 04:26 AM UTC

Hi Brain,

Thank you for your update. Please let us know if you need any further assistance.

Regards,
Abirami.

Loader.
Live Chat Icon For mobile
Up arrow icon