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

Pane Print data outside of box

3 Answers 21 Views
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 18 Apr 2012, 03:00 PM
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

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 20 Apr 2012, 10:47 AM
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.
0
John
Top achievements
Rank 1
answered on 20 Apr 2012, 01:38 PM
Thanks, that did the job!
I'd suggest that this information be added to the "Printing Pane Content" in the help documentation.

0
Dobromir
Telerik team
answered on 20 Apr 2012, 02:30 PM
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.
Asked by
John
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
John
Top achievements
Rank 1
Share this question
or