DotNetUSA
May 21, 2007, 14:14:39
I am programatically creating the DotNet Server Control.
TXTextControl.ServerTextControl s = new TXTextControl.ServerTextControl();
s.Create();
I am dynamically creating a table and I have a label for the title just above this table. I want the label to always print on the same page as the table with no page breaks between the label and the table.
I tried using the following code
s.ParagraphFormat.KeepLinesTogether = true;
s.ParagraphFormat.KeepWithNext = true;
or even
s.Selection.ParagraphFormat.KeepLinesTogether = true;
None of these seem to work.
In one of the documents the label is printed at the end of the page and the table at the beginning of the next page.
When this happens how can I get the label to print with the table on the next page.
TXTextControl.ServerTextControl s = new TXTextControl.ServerTextControl();
s.Create();
I am dynamically creating a table and I have a label for the title just above this table. I want the label to always print on the same page as the table with no page breaks between the label and the table.
I tried using the following code
s.ParagraphFormat.KeepLinesTogether = true;
s.ParagraphFormat.KeepWithNext = true;
or even
s.Selection.ParagraphFormat.KeepLinesTogether = true;
None of these seem to work.
In one of the documents the label is printed at the end of the page and the table at the beginning of the next page.
When this happens how can I get the label to print with the table on the next page.