pane.print and webresources

2 posts, 1 answers
  1. Lien Vandamme
    Lien Vandamme avatar
    2 posts
    Member since:
    Jun 2008

    Posted 06 Feb 2009 Link to this post


    A little question about custom skinning and the pane.print functionality.

    We have made a custom skin for everything (based on WebBlue) which we have super optimized following your instructions. So now we have webresources. For the pane.print (javascript) functionality we have

    var cssFileAbsPath1 = 'App_Themes/Metis/GlobalMaster.css';  


    var cssFileAbsPath11 = 'Print.css'


    var arrExtStylsheetFiles = [cssFileAbsPath1,cssFileAbsPath11];  




    But can we use webresources in here otherwise we have to put the css back in the project instead of the seperate project

    Maybe something interesting for demos,..

    thanks in advance,
    The Sofim-team (Belgium)



  2. Answer
    Tsvetie avatar
    1517 posts

    Posted 09 Feb 2009 Link to this post

    Hello Lien Vandamme,
    You can use the following approach in order to get the root relative paths to the CSS files of the skins:
    var calendarVistaCss = '<%= Page.ClientScript.GetWebResourceUrl(typeof(RadCalendar), "Telerik.Web.UI.Skins.Vista.Calendar.Vista.css") %>';    
    var comboVistaCss = '<%= Page.ClientScript.GetWebResourceUrl(typeof(RadComboBox), "Telerik.Web.UI.Skins.Vista.ComboBox.Vista.css") %>';    
    var textBoxVistaCss = '<%= Page.ClientScript.GetWebResourceUrl(typeof(RadInputControl), "Telerik.Web.UI.Skins.Vista.Input.Vista.css") %>';    
    var gridVistaCss = '<%= Page.ClientScript.GetWebResourceUrl(typeof(RadGrid), "Telerik.Web.UI.Skins.Vista.Grid.Vista.css") %>';    
    var formDecoratorMainCss = '<%= Page.ClientScript.GetWebResourceUrl(typeof(RadFormDecorator), "Telerik.Web.UI.Skins.FormDecorator.css") %>';    
    var formDecoratorVistaCss = '<%= Page.ClientScript.GetWebResourceUrl(typeof(RadFormDecorator), "Telerik.Web.UI.Skins.Vista.FormDecorator.Vista.css") %>'

    Please note that some of our controls have both a common CSS file (common for all skins) and a skin-specific CSS file while others have only a skin-specific CSS file. In the first case, you will have to add the links to both files in your arrExtStylsheetFiles.

    Thank you for your suggestion. Actually we are considering implementing this in the code of the control (copy all links from the page, holding the splitter, to the HEAD of the page that you print). In case we decide not to, we will provide a demo or a KB article, demonstrating this approach.

    Best wishes,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top