print pane page style not apply

2 posts, 0 answers
  1. maduka
    maduka avatar
    3 posts
    Member since:
    Jul 2008

    Posted 28 Jun 2010 Link to this post

    this my html code
    <telerik:RadSplitter id="RadSplitter1" runat="server" height="200"
     <telerik:RadPane id="InternalContentPane" runat="server" width="120"
     <Telerik:RadMenu ID="mBar0" Runat="server" Skin="Office2007" Width="100%"
           <CollapseAnimation Duration="200" Type="OutQuint" /> 
               <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem1"
               <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem2"
                       <Telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"
                               <Telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"
                       <Telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2"
               <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem3"
               <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem4"
               <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem5"
               <Telerik:RadMenuItem runat="server" Text="Root RadMenuItem6"
           Founded in 2002, Telerik Corporation is a leading vendor of User Interface (UI)  
           components for ASP.NET and Windows Forms. Building on our expertise in interface  
           development and Microsoft technologies, Telerik helps customers build  
           applications with unparalleled richness, responsiveness and interactivity.  
           Created with passion, Telerik products help thousands of developers every day to  
           be more productive and deliver reliable applications under budget and on time. 
     <telerik:RadSplitBar id="RadSplitbar1" runat="server"/> 
     <telerik:RadPane id="ExternalContentPane" runat="server" width="300" 
        ContentUrl="" /> 
    <href="javascript:PrintPane('<%= InternalContentPane.ClientID %>');"
     Print the content of 'Internal Content Pane'</a><br /> 
    <href="javascript:PrintPane('<%= ExternalContentPane.ClientID %>');"
     Print the content of 'External Content Pane'</a> 
    <script type="text/javascript"
    function PrintPane (paneID) 
     var splitter = $find('<%= RadSplitter1.ClientID%>'); 
     var pane = splitter.GetPaneById(paneID); 
     if (!pane) return; 
     var cssFileAbsPath = 'http://localhost/printStyles.css'
     var arrExtStylsheetFiles = [ cssFileAbsPath ]; 

    when I print 'Internal Content Pane'
    the RadMenu Style will lose
    I use ver 2008.02.0826.35 to develop project, and this project scope is very large
    I try to upgrade ver 2010, but have some error
    How to fix this print problem?
  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 30 Jun 2010 Link to this post

    Hi Maduka,

    In order to print CSS decorated content of RadPane you need to provide path to the CSS files. In your scenario you will need to configure the RadMenu to use an external CSS files in order to be able to provide them to the print() method of RadPane.
    To do so you need to follow these steps:
    1. Set RadMenu's property EnableEmbeddedSkins to false:
      <Telerik:RadMenu ID="mBar0" Runat="server" Skin="Vista" Width="100%" EnableEmbeddedSkins="false">
    2. Copy the skin related CSS files and images for RadMenu from Skin folder located in the Telerik instalation folder(most often C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX XXXXX\Skins)
    3. Register the RadMenu's CSS files on the page:
      <link href="Skin/Menu.css" rel="stylesheet" type="text/css" />
      <link href="Skin/Vista/Menu.Vista.css" rel="stylesheet" type="text/css" />
    4. Provide the path to these CSS files as an array property to the RadPane's print method:
      function PrintPane(paneID)
          var splitter = $find('<%= RadSplitter1.ClientID%>');
          var pane = splitter.GetPaneById(paneID);
          if (!pane) return;
          var arrExtStylsheetFiles = ['./Skin/Menu.css', "./Skin/Vista/Menu.Vista.css"];

    For your convenience I have attached a sample project with the above mentioned implementation.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top