
ClientScript.GetWebResourceUrl(GetType(RadGrid),"Telerik.Web.UI.Skins.Office2007.Grid.Office2007.css")
and then pass the result as an absolute path to the pane.print() method.
This doesn't seem to work since upgrading to the latest controls and the external Skins assembly. It worked before.
The "Telerik.Web.UI.Skins.Office2007.Grid.Office2007.css" seems like it ought to work, but my print page is not applying the grid skin. Is there some alteration I need to make to this code to reference the grid skin?
6 Answers, 1 is accepted
This issue is due to a breaking change of the Q3 2011 release, where all existing skins, except Default, are moved to a separate skins assembly(Telerik.Web.UI.Skins.dll). For Page.ClientScript.GetWebResourceUrl this means that it may not identify the embedded resource by a type in Telerik.Web.UI.dll, if that resource is in Telerik.Web.UI.Skins.dll. As embedded resources have now changed their place, your GetWebResourceUrl() code will not work. Please, read the following blog post, that describes the alternatives you can utilize.
All the best,
Milena
the Telerik team

function PrintDashboardGrid(gridId, title) {
var gridSkinUrl = '<%= Telerik.Web.SkinRegistrar.GetWebResourceUrl(Me.Page, GetType(RadGrid), "Telerik.Web.UI.Skins.Office2007.Grid.Office2007.css") %>';
var cssFileAbsPaths = new Array();
cssFileAbsPaths[0] = gridSkinUrl
var grid = $find(gridId);
var previewWnd = window.open('about:blank', '', '', false);
var titleContent = "";
var now = new Date();
var month = convertMonth(now.getMonth());
var year = now.getYear();
var day = convertDay(now.getDay());
var date = now.getDate();
if (year <
1900
) {
year
= year + 1900;
}
if (title != '' && title != null) {
title = "<h3>" + title + "</
h3
>";
title = title + "<
h4
>" + now + "</
h4
>"
}
var sh = gridSkinUrl;
var styleStr = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd'><
html
><
head
><
link
href
=
'" + sh + "'
rel
=
'stylesheet'
type
=
'text/css'
/><
style
type
=
'text/css'
>#" + gridId + "_GridData{overflow:visible !important;height:auto !important;}#" + gridId + "_GridHeader{margin:0 !important;padding:0 !important;}</
style
></
head
>";
var oldWidth = grid.get_element().style.width;
grid.get_element().style.width = "1600px";
grid.repaint();
var htmlcontent = styleStr + "<
body
>" + title + getOuterHTML(grid.get_element()) + "</
body
></
html
>";
previewWnd.document.open();
previewWnd.document.write(htmlcontent);
previewWnd.document.close();
previewWnd.print();
previewWnd.close();
grid.get_element().style.width = oldWidth;
grid.repaint();
}
this code throws the following javascript error in the fitst grid.repaint call:
Error: a[d].get_visible is not a function
Source File: ... ScriptResource.axd?d=PMhSbZd4iWjAxW-377wkUucv5L09yl93HYRXst_WKFB1-uhRhzfg5dYBQCPA8hiLxvQOF664E5-YCNYcSwPKCq142GjPqfZDK724uRg3WT2J7bwnWSYBMtUmFVziVGmJEiV68g2&t=4d9f8e87
Line: 1651
and it references the web resource line:
for(var d in a){if(!a[d].get_visible()){this._owner.get_masterTableView().showColumn(d);
i'm not sure if this is a broken change from upgrading to Q3 2011 or not. Can you tel lme what modificaiton is necessary?
I was not able to reproduce the described issue based on the provided information. Could you please open a support ticket and send us a small working project? Thus we will be able to debug it locally and will get back to you with our findings.
I am looking forward your reply.
All the best,
Milena
the Telerik team

On the base of the provided information in Anon`s post, we investigated the issue and confirmed that this is a bug. We will log it and our dev team will ensure a proper fix for the next major release.
Regards,
Milena
the Telerik team