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

pane.print and webresources

1 Answer 51 Views
This is a migrated thread and some comments may be shown as answers.
Lien Vandamme
Top achievements
Rank 1
Lien Vandamme asked on 06 Feb 2009, 10:10 AM

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)



1 Answer, 1 is accepted

Sort by
Telerik team
answered on 09 Feb 2009, 09:46 AM
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.
Asked by
Lien Vandamme
Top achievements
Rank 1
Answers by
Telerik team
Share this question