We have had no issues printing in any browsers until Microsoft Edge. The contents of the radWindow overlays the underneath layers when printing. How do we globally fix this as we have a TON of places we print the contents of radWindows?
Thanks!
6 Answers, 1 is accepted
Hi Stephanie,
Printing is a browser feature and our controls do not affect it.
If there are problems with the way Edge prints, they can be related to either of the following:
- printing an <iframe> element (this is what RadWindow uses to load its content page)
- printing an absolutely positioned <div> element (this is what RadWIndow's ContentTemplate is)
- general issues between Edge and your printter (or its drivers)
Regards,
Marin BratanovTelerik
Hello Martin,
Thank you for the reply! I do understand that printing is not under your control. My question still is though: how do we print the contents of the RadWindos (iframe) only, not the underlying window in Microsoft Edge as it works in all the other browsers fine thus far? I would love to tell clients not to use any Microsoft browser, but you know they still will :)
Any help would be greatly appreciated.
Hi,
You can call the print() method of the iframe object. Or execute the browser print command, both are browser API. You can find an example in the sample from this KB article: http://www.telerik.com/support/kb/aspnet-ajax/window/details/adding-a-custom-button-to-radwindow-titlebar.
You can get the iframe through the get_contentFrame() method of the RadWindow object.
Regards,
Telerik
Thanks for the quick reply!
It sounds like we are already going the print/execute print you are referring to This is how we are currently doing it:
<script type="text/javascript">
function PrintPage() {
if (document.all) {
document.execCommand("Print");
}
else {
window.setTimeout("window.print()", 250);
}
window.setTimeout("close()", 250);
}
</script>
But that does not work in Microsoft Edge....
Hi Stephanie,
I do not have any further suggestions on this browser problem. What I can offer as a troubleshooting idea is to get a simple iframe to print as expected, and then the same approach will work for a RadWindow: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/common-issues#general-troubleshooting.
Regards,
Telerik