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

Return Codes from print dialog

1 Answer 68 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chad Johnson
Top achievements
Rank 1
Chad Johnson asked on 01 Apr 2013, 02:28 PM
We are using the RedEditor control to print letters from our ASP.NET application.  We have a client side event on a Print button as follows:
function radButtonPrint_ClientClicked() {
    var editor = $find('radEditor');
    editor.fire("Print");
}

When the user clicks the Print button, the print dialog appears and we can select the desired printer and print the letter (the HTML contents of the RadEditor control).

Is there a way to get the return codes from the Print Dialog via this "fire" command?  We're trying to handle the case where the user has clicked Print to open the Print Dialog and then clicked Cancel on the dialog so that ultimately we can take further action (redirect appropriately, etc)

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 03 Apr 2013, 02:01 PM
Hello,

RadEditor uses the browser's Print() and execCommand("Print") methods to print the content inside its editable iframe content area. These methods call the browser's Print dialog, which does not offer the ability to attach events to its OK and Cancel buttons and execute custom code.

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Chad Johnson
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or