How to display RadGridview Header on each page using Print and Export with RadDocument in RadGridview?

4 posts, 0 answers
  1. Bharat Mendapara
    Bharat Mendapara avatar
    18 posts
    Member since:
    Sep 2013

    Posted 11 Apr 2014 Link to this post

    My current installed version is 2013.3.1204.40.

    I am using RadGridView to print and print preview using "Print and Export with RadDocument". I want to set header on each page at the time of
    Print & Print Preview. How can I go about with this issue.

    Any help will be much more appreciated.

    Regards,
    Bharat Mendapara
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 14 Apr 2014 Link to this post

    Hi Bharat,

    You can check this forum thread where a similar topic has been discussed.

    Regards,
    Didie
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Bharat Mendapara
    Bharat Mendapara avatar
    18 posts
    Member since:
    Sep 2013

    Posted 15 Apr 2014 in reply to Dimitrina Link to this post

    Hi Didie,

    I checked forum thread which you provide me. But there is a confusion for the following code exactly where should I placed?

    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);

    Can you tell me?

    Regards,
    Bharat Mendapara
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Apr 2014 Link to this post

    Hello,

    As you are following the example, the data is first exported with RadGridView.Export() method and then the exported stream is imported and printed. So, you cannot directly insert the suggested code. 
    You can add this code when you are building the RadDocument to be printed manually, element by element, in your code. 
    In order to be able to better understand what I suggest, you can to go through the articles about using the RadDocument and about the document viewer control - RadRichTextBox.  You could as well review this article on how you could create the document elements. Basically you need to create the document to be printed.

    Regards,
    Didie
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top