Hi John,
Thank you for writing.
Currently, there we do not have plans to implement the IPrintable interface for RadDataEntry since we have not had users requesting such functionality. If we receive additional reports we will consider the possibility.
For the time being, you can manually implement the interface:
public
class
PrintableRadDataEntry : RadDataEntry, IPrintable
{
#region IPrintable Members
public
int
BeginPrint(RadPrintDocument sender, PrintEventArgs args)
{
return
1;
}
public
bool
EndPrint(RadPrintDocument sender, PrintEventArgs args)
{
return
false
;
}
public
bool
PrintPage(
int
pageNumber, RadPrintDocument sender, PrintPageEventArgs args)
{
Bitmap bmp =
new
Bitmap(
this
.Width,
this
.Height);
this
.DrawToBitmap(bmp,
new
Rectangle(Point.Empty,
this
.Size));
args.Graphics.DrawImage(bmp, Point.Empty);
return
false
;
}
public
Form GetSettingsDialog(RadPrintDocument document)
{
return
new
PrintSettingsDialog(document);
}
public
void
Print()
{
RadPrintDocument doc =
this
.CreatePrintDocument();
doc.Print();
}
public
void
PrintPreview()
{
RadPrintDocument doc =
this
.CreatePrintDocument();
RadPrintPreviewDialog dialog =
new
RadPrintPreviewDialog(doc);
dialog.ThemeName =
this
.ThemeName;
dialog.ShowDialog();
}
private
RadPrintDocument CreatePrintDocument()
{
RadPrintDocument doc =
new
RadPrintDocument();
doc.AssociatedObject =
this
;
return
doc;
}
#endregion
}
You can then call the relevant methods.
I hope this helps.
Regards,
George
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.