This is a migrated thread and some comments may be shown as answers.

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

3 Answers 138 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Bharat Mendapara
Top achievements
Rank 1
Bharat Mendapara asked on 11 Apr 2014, 01:37 PM
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

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 14 Apr 2014, 01:04 PM
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.

 
0
Bharat Mendapara
Top achievements
Rank 1
answered on 15 Apr 2014, 09:37 AM
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
0
Dimitrina
Telerik team
answered on 15 Apr 2014, 01:13 PM
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.

 
Tags
GridView
Asked by
Bharat Mendapara
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Bharat Mendapara
Top achievements
Rank 1
Share this question
or