Export to RadDocument (TableHader over multiple pages?)

5 posts, 0 answers
  1. Felix
    Felix avatar
    11 posts
    Member since:
    Jul 2012

    Posted 02 Jul 2012 Link to this post

    Hi,
    I export the RadGridView via the Democode to a RadDocument.
    The table in the RadDocument is could be quiet big. 
    I want on every page the the TableHeader printed again.
    Also i want some basic header and footer (I already could add pagenumber / logo ..)

    But i have no chance to make the repeatable TableHeader, and if there are too many columns that it continues on the next page. 

    Is this even possible with RadDocument or do I have to use Reporting for this?

    kind regards
    felix
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 02 Jul 2012 Link to this post

    Hello,

    In order to add a print header to every page - you can create a header section and assign it to the HeaderFooterUIContext of the editor. Something like so:

    Section firstSection = this.editor.Document.Sections.First;
    Header header = newHeader();
    header.Body = CreateRadDocumentForHeader(); //RadDocument to show in the header
    this.editor.HeaderFooterUIContext.UpdateHeader(firstSection, HeaderFooterType.Default, header);

    Please check this help article on creating a document table in code behind.  This feature still needs improvement until it is fully implemented, but you may review how it fits to your case.

    For more complex scenarios I would recommend you to use Telerik Reporting.

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Felix
    Felix avatar
    11 posts
    Member since:
    Jul 2012

    Posted 02 Jul 2012 Link to this post

    Table header works..

    but real problem is with big tables.. (lot of columns)

    With the less columns example the table is stretched and looks nice.
    less columns

    But with a lot of columns it gets very ugly.. is there a method to put the overflow in a separate page?
    a lot of columns

    I figured out reporting is not very good, because we work with variable number of columns. In the reporting we have to type the values hard for every column, so not really our case....

    I hope my problem is now more understandable :-)

    kind regards
    felix
  5. Felix
    Felix avatar
    11 posts
    Member since:
    Jul 2012

    Posted 03 Jul 2012 Link to this post

    Not possible with RadDocument?
  6. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 04 Jul 2012 Link to this post

    Hello Felix,

    In RadDocument, it is possible to increase the size of the page in order to make it wide enough to show all columns correctly. This can be done by setting the PageSize property of the Section you have created in code-behind to a new Size(width, height).

    The documents will be exported to PDF using the size specified in the section. As for printing, RadRichTextBox and RadDocument do not have an implementation of horizontal overflow.

    Greetings,
    Iva Toteva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready