3 Answers, 1 is accepted
0
Hi Evren,
Nikolay
the Telerik team
Thank you for this question.
The printing functionality of RadGridView and RadScheduler was introduced in Q1 2012 as described in our Release Notes. RadPrintDocument is a part of this functionality so you can find it in Q1 2012.
I hope this helps.
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Hugo Furth
Top achievements
Rank 1
answered on 23 Sep 2014, 11:25 PM
Hi All -
I didn't find a topic for RadPrintDocument so posting here.
I am trying to set the papersize to legal before the PrintPreview Method. But it doesn't seem to work.
Also would like to set the font of the data cells (as can be done in the PrintPreview window) but can't find the appropriate protperies. Any help appreciated. Here was my best attempt:
private void rbPrint_Click(object sender, EventArgs e)
{
if (radGridView1.RowCount == 0)
return;
RadPrintDocument d = new RadPrintDocument();
System.Drawing.Printing.PaperKind k = System.Drawing.Printing.PaperKind.Legal;
d.PaperSize.RawKind = (int)k;
d.DefaultPageSettings.PaperSize.RawKind = (int)k;
d.AssociatedObject = radGridView1;
d.Landscape = true;
radGridView1.PrintPreview(d);
}
Regards,
Hugo
I didn't find a topic for RadPrintDocument so posting here.
I am trying to set the papersize to legal before the PrintPreview Method. But it doesn't seem to work.
Also would like to set the font of the data cells (as can be done in the PrintPreview window) but can't find the appropriate protperies. Any help appreciated. Here was my best attempt:
private void rbPrint_Click(object sender, EventArgs e)
{
if (radGridView1.RowCount == 0)
return;
RadPrintDocument d = new RadPrintDocument();
System.Drawing.Printing.PaperKind k = System.Drawing.Printing.PaperKind.Legal;
d.PaperSize.RawKind = (int)k;
d.DefaultPageSettings.PaperSize.RawKind = (int)k;
d.AssociatedObject = radGridView1;
d.Landscape = true;
radGridView1.PrintPreview(d);
}
Regards,
Hugo
0
Hello Hugo,
Thank you for writing.
In order to customize the paper size you should specify the RadPrintDocument.DefaultPageSettings.PaperSize property. Here is a sample code snippet:
You can find additional information in our Telerik Presentation Framework >> Printing Support >> RadPrintDocument section in the online documentation.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for writing.
In order to customize the paper size you should specify the RadPrintDocument.DefaultPageSettings.PaperSize property. Here is a sample code snippet:
private
void
radButton1_Click(
object
sender, EventArgs e)
{
if
(radGridView1.RowCount == 0)
return
;
RadPrintDocument d =
new
RadPrintDocument();
d.DefaultPageSettings.PaperSize =
new
System.Drawing.Printing.PaperSize(
"A2"
,420,594);
d.AssociatedObject = radGridView1;
d.Landscape =
true
;
radGridView1.PrintPreview(d);
}
You can find additional information in our Telerik Presentation Framework >> Printing Support >> RadPrintDocument section in the online documentation.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.