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

Printing

6 Answers 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrew
Top achievements
Rank 1
Andrew asked on 27 Mar 2012, 08:22 AM
I would like to print some information which is in my GridView Control. 
I noticed there are some examples how to simply print the grid.

I would however like to make it a little bit more user friendly, i need to add a few items above and bellow to the printed page.
Just general information and place for signature etc,

What would you say would be a good way to approach it. 
I have been looking at the RichTextBox, perhaps i can stick everything in there and print from it.

I need some general advice on what control/controls would be best to use here.

Thanks

6 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 Mar 2012, 08:29 AM
Hi,

Indeed you can use the RTB to customize the printing. Here is the demo.  

Kind regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Andrew
Top achievements
Rank 1
answered on 30 Mar 2012, 06:56 AM
The line: rtb.Print("MyDocument", Documents.UI.PrintMode.Native);

What reference do i need to add for "Documents.UI.PrintMode.Native", it's not clear.
0
Dimitrina
Telerik team
answered on 30 Mar 2012, 09:24 AM
Hi,

 You need a reference to the 'Telerik.Windows.Documents' assembly.

Kind regards,
Didie
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Andrew
Top achievements
Rank 1
answered on 30 Mar 2012, 10:24 AM
I am now trying out the code from your example, but get the following error: "Dialogs must be user-initiated."
It happens at this point: rtb.Print("MyDocument", Telerik.Windows.Documents.UI.PrintMode.Native);

0
Andrew
Top achievements
Rank 1
answered on 30 Mar 2012, 10:37 AM
It has started working on it's own. Don't know why. Maybe it was somehow related to debugging.

I have another question however, now i would like to add additional info on the document.

What is the difference between a section and a block?

Should i be adding free text inside a block?
0
Accepted
Dimitrina
Telerik team
answered on 30 Mar 2012, 12:24 PM
Hello,

 Please check this help article about the table elements. 

Regards,
Didie
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Andrew
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or