Pane Print data outside of box

4 posts, 0 answers
  1. John
    John avatar
    19 posts
    Member since:
    Sep 2011

    Posted 18 Apr 2012 Link to this post

    Attached is a screen print showing the results of a pane.Print.  Consistently I am seeing RadNumericTextBox and RadMaskedTextBox printing the data outside of the outlined box when a pane.print is performed.  In the attached, "Payment Amt" is a RadNumericTextBox and "Invoice Number" is a RadTextBox.  Seems the Pane.Print works as expected with the RadTextBox but not as expected with the RadNumericTextBox (see how the $1 amount is outside of the box on the print example).  I am seeing this for all browsers.  Using V2012.1.327.35.

    I have followed the Pane.Print documentation example but have failed to find a correction for this issue.  Can you provide a solution for this behavior?
    Thanks
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 20 Apr 2012 Link to this post

    Hi John,

    The problem that you experience is due to the missing CSS files decorating the RadNumericTextBox and RadMaskedTextBox (or any RadControl for that matter). To avoid this issue you need to add the CSS files that decorate the controls to the external stylesheets array.

    Here is a sample PrintPane function including the CSS files decorating RadControls linked on the page and add them to the arrExtStylsheetFiles array:
    function PrintPane(paneID)
    {
        var splitter = $find('<%= RadSplitter1.ClientID%>');
        var pane = splitter.GetPaneById(paneID);
        if (!pane) return;
      
        var arrExtStylsheetFiles = getTelerikCssLinks();
      
        pane.Print(arrExtStylsheetFiles);
    }
      
    function getTelerikCssLinks()
    {
        var result = new Array();
          
        var links = document.getElementsByTagName("LINK");//get all link elements on the page
      
        for (var i = 0; i < links.length; i++)
        {
            if (links[i].getAttribute("class") == "Telerik_stylesheet")//check if the link element is a Telerik Stylesheet
                result.push(links[i].getAttribute("href", 2));//add link href attribute to the result
        }
      
        return result;
    }


    Kind regards,
    Dobromir
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. John
    John avatar
    19 posts
    Member since:
    Sep 2011

    Posted 20 Apr 2012 Link to this post

    Thanks, that did the job!
    I'd suggest that this information be added to the "Printing Pane Content" in the help documentation.

  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 20 Apr 2012 Link to this post

    Hi John,

    Thank you for your suggestion. I have logged this into our database and we will do our best to update the related help article with the missing information.

    Kind regards,
    Dobromir
    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