Troubles with nested tables


#1

I’m having some problems with nest tables. Basically, I have a “parent” table that has numerous “child” tables defined within it. I want to make sure that each child table is fully contained within a page and does not span pages. I’ve read the forums and saw that I should be using the “IsKeptTogether” or “IsBroken” property. I’ll admit to not fully understanding the difference between these two, but I have tried both.

The “IsBroken” property appears not to have an effect on preventing the child tables from spanning pages.

The “IsKeptTogether” property does have an effect, but NEGATIVE. When this property is set on the child tables, the child tables appear to overwrite each other at the bottom of the page–rather than rendering properly at the top of the next page.

Any suggestions?

Thanks,
Pam


#2

Dear Pam,

Thank you for considering Aspose.

Sorry for not makeing it clear in the document. The “IsKeptTogether” property affects only paragraphs in the section but not those in table cells. If your child tables are in single rows, you can use the Row.IsRowBroken to control it. Otherwise it is not easy to control it. I will try to add support for this function later. But it is not a easy work and needs much time.


#3

Thanks for your assistance. What you’ve suggested worked well for nested tables that were explicitly defined in my xml file. However, the same technique did not appear to work when I cloned nested tables. Should there be a difference in functionality when nested tables are cloned?

Thanks again for your help!
Pam


#4

Dear Pam,

Thank you for considering Aspose.

Can you please elaborate the problem when cloning nested table? Please send me an example if possible. I will be more than glad to help you.