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

print the header on the new page for the table again, when the page breaks.How

Thread ID:

Created:

Updated:

Platform:

Replies:

126079 Sep 22,2016 07:35 AM UTC Sep 23,2016 05:41 AM UTC ASP.NET MVC 2
loading
Tags: DocIO
mvxyc
Asked On September 22, 2016 07:35 AM UTC

print the header on the new page for the table again, when the page breaks.How ?

mvxyc
Replied On September 22, 2016 07:55 AM UTC

plus some custom header on each page word breaks before the table starts

Priyanga Elangovan [Syncfusion]
Replied On September 23, 2016 05:41 AM UTC

Hi Customer,

Thank you for contacting Syncfusion support.

Regarding “print the header on the new page for the table again, when the page breaks.How ?
”:
As per your requirement, to repeat the header row content automatically when the table breaks the pages kindly set the table.Rows[0].IsHeader property as true. For your reference please refer the below code snippet.

Code Snippet:
 
//Loads the template document
WordDocument wordDocument = new WordDocument("template.docx");
//Gets the table in the document
WTable table = wordDocument.LastSection.Tables[0] as WTable;
//Sets the IsHeader property of first row in the table as true
table.Rows[0].IsHeader =
true;
//Saves the document
wordDocument.Save(
"output.docx"); 

Regarding “plus some custom header on each page word breaks before the table starts”:
It is not possible to set the custom header on each page before the table starts using DocIO. If your requirement is to have different header row for each page, kindly insert the new table on each page and define the header row for each table as per your requirement.

Regards,
Priyanga.E
 


CONFIRMATION

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.

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

;