View previous topic :: View next topic |
Author |
Message |
vadimiron
Joined: 22 Nov 2007 Posts: 2 Location: Cologne, Germany
|
Posted: Thu Nov 22, 2007 2:36 pm Post subject: Add Header for Table on each new Page |
|
|
Hallo,
Ich have a long Table, which takes several Pages. Everything works fine, but now i need:
I want to add a header of this Table (just a row with titles of all Columns) on each new Page, that is generated to show the whole Table - it it possible with MigraDoc?? Is there an example? |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Nov 26, 2007 9:09 am Post subject: |
|
|
Hi!
Here's how to do it:
Code: | Row row = table.AddRow();
row.HeadingFormat = true;
|
Rows and columns with HeadingFormat will be repeated on every new page. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
vadimiron
Joined: 22 Nov 2007 Posts: 2 Location: Cologne, Germany
|
Posted: Mon Dec 03, 2007 11:09 am Post subject: |
|
|
Cool!
Thank you!!
Grüsse aus Köln |
|
Back to top |
|
|
Phil
Joined: 06 Apr 2009 Posts: 3
|
Posted: Thu Apr 09, 2009 10:34 am Post subject: |
|
|
Hi,
I have a Problem: I had tried this Solution but it doesn't work.
My Code:
Code: |
row5 = table5.AddRow();
row5.HeadingFormat = true;
cell5 = row5.Cells[0];
cell5.AddParagraph().AddFormattedText("Name", TextFormat.Bold);
cell5 = row5.Cells[1];
cell5.AddParagraph().AddFormattedText("Vorname", TextFormat.Bold);
cell5 = row5.Cells[2];
cell5.AddParagraph().AddFormattedText("Telefon", TextFormat.Bold);
cell5 = row5.Cells[3];
cell5.AddParagraph().AddFormattedText("Plz", TextFormat.Bold);
cell5 = row5.Cells[4];
cell5.AddParagraph().AddFormattedText("Ort", TextFormat.Bold);
cell5 = row5.Cells[5];
cell5.AddParagraph().AddFormattedText("Strasse", TextFormat.Bold);
cell5 = row5.Cells[6];
cell5.AddParagraph().AddFormattedText("Hausnummer", TextFormat.Bold);
cell5 = row5.Cells[7];
cell5.AddParagraph().AddFormattedText("E-Mail", TextFormat.Bold); |
After the page break, the row was not repeated
What is wrong? |
|
Back to top |
|
|
Phil
Joined: 06 Apr 2009 Posts: 3
|
Posted: Tue Apr 14, 2009 8:14 am Post subject: |
|
|
Maybe is my Problem in the title:
Code: |
Cell cell5;
Row row5;
row5 = table5.AddRow();
row5.KeepWith = 2;
cell5 = row5.Cells[0];
cell5.MergeRight = 3;
cell5.Format.Font.Bold = false;
paragraph = cell5.AddParagraph();
paragraph.AddFormattedText("Adressen", "Heading2");
paragraph.AddBookmark("Adressen");
paragraph.Format.OutlineLevel = OutlineLevel.Level2;
row5 = table5.AddRow();
row5 = table5.AddRow();
row5.HeadingFormat = true;
cell5 = row5.Cells[0];
cell5.AddParagraph().AddFormattedText("Name", TextFormat.Bold);
.
.
.
|
Does anyone have a solution for my problem? |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Wed Apr 15, 2009 10:31 am Post subject: |
|
|
Heading rows are the first rows of a table.
I think you can't make row 5 a heading row if rows 1 through 4 are no heading rows. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
Phil
Joined: 06 Apr 2009 Posts: 3
|
Posted: Wed Apr 15, 2009 10:38 am Post subject: |
|
|
is there then a way to keep a paragraph (title for the table) together with the table on the same page? paragraph.keeptogther und paragraph.keepwithnext don't work... |
|
Back to top |
|
|
|