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.
Unfortunately, activation email could not send to your email. Please try again.

avoid page break between 2 table rows

Thread ID:

Created:

Updated:

Platform:

Replies:

124599 Jun 16,2016 05:58 AM Jun 21,2016 01:30 AM Windows Forms 5
loading
Tags: DocIO
Bodo Jäger
Asked On June 16, 2016 05:58 AM

Hi,
I want to avoid a page break between 2 table rows.
Word can do that.
Is it possible with DocIO?

Bodo

Priyanga Elangovan [Syncfusion]
Replied On June 17, 2016 04:39 AM

Hi Bodo,

Thank you for contacting Syncfusion support.

On further analyzing your requirement, to remove the pagebreak in between two tables as equivalent to Word, we have prepared a demo sample using DocIO with two buttons to illustrate your requirement.The first button removes the pagebreak from the paragraph if the paragraph has pagebreak and present in between two tables and the second button removes the entire paragraph if the paragraph has pagebreak and present in between two tables. Please find the sample from below link and let us know if it helps.

Sample link
http://www.syncfusion.com/downloads/support/forum/124599/ze/GenerateWord_Windows-1042326147.zip

Note:
If you use the second button to remove the complete paragraph, then the two tables in the generated Word document will looks like single table while viewing the generated document in Microsoft Word application but in file level it is preserved as two table.

If we misunderstood your requirement, kindly elaborate your requirement with clear description (like screenshot of your output or expected output document), Thereby we will analyse further on your requirement and update you appropriate solution at the earliest.

Regards,
Priyanga.E
 


Bodo Jäger
Replied On June 17, 2016 05:59 AM

Thank you for your reply, but you missunderstand me.

I create a table and add a lot of rows, with row.RowFormat.IsBreakAcrossPages = false.
This avoid a page break inside a row, and Word breaks the page between 2 rows, if the second flows over the page.

My problem is, that I need to hold two rows together, so that Word breaks the page before this two rows, of after these two rows, but never betwenn them.

Bodo




Priyanga Elangovan [Syncfusion]
Replied On June 18, 2016 01:53 AM

Hi Bodo,

Thank you for your update

On further analyzing your requirement, to preserve the two adjacent rows in the same page as equivalent to Word, we have prepared a demo sample using DocIO to illustrate your requirement. You can achieve your requirement by setting the WParagraph.ParagraphFormat.KeepFollow property as true to the first paragraph of the first row of two rows which should be preserved together in the same page. Please find the sample from below link and let us know if it helps

Sample linK
http://www.syncfusion.com/downloads/support/forum/124599/ze/GenerateWord_Windows-9717678.zip

Regards,
Priyanga.E
 


Bodo Jäger
Replied On June 20, 2016 02:55 AM

Thanks for your solution.

It works, but there is another condition that has to be true.

In my case I have a multi coloum table, only with text in the second column.
I must assign the KeepFollow property to an paragraph (in my case he is empty) in the first column.

But that's no problem for me

Bodo

Priyanga Elangovan [Syncfusion]
Replied On June 21, 2016 01:30 AM

Hi Bodo,

Thank you for your update

Please get back to us if you need any further assistance.

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.

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.

;