Return Codes from print dialog

2 posts, 1 answers
  1. Chad Johnson
    Chad Johnson avatar
    17 posts
    Member since:
    Apr 2010

    Posted 01 Apr 2013 Link to this post

    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)
  2. Answer
    Rumen
    Admin
    Rumen avatar
    13895 posts

    Posted 03 Apr 2013 Link to this post

    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.
Back to Top