Hello,
We're developing web parts in SharePoint using RadControls. We're allowing our customers to select which skin they'd like to apply from the list of available embedded skins, and just recently we encountered a problem with IE and it's 31-stylesheet limit. If we have more than 2 or 3 components on the page, the styling is not properly applied. So we're tyring to make use of the RadStyleSheetManager to combine the skin styles to reduce the number of files on the page.
This is what I have so far, in PageLoad, the following code is called:
But for some reason the combined css file is rendered empty, and nothing is styled. What am I missing?
We're developing web parts in SharePoint using RadControls. We're allowing our customers to select which skin they'd like to apply from the list of available embedded skins, and just recently we encountered a problem with IE and it's 31-stylesheet limit. If we have more than 2 or 3 components on the page, the styling is not properly applied. So we're tyring to make use of the RadStyleSheetManager to combine the skin styles to reduce the number of files on the page.
This is what I have so far, in PageLoad, the following code is called:
CWGrid.Skin = skinName;
CWGrid.EnableEmbeddedBaseStylesheet =
false
;
CWGrid.EnableEmbeddedSkins =
false
;
RadAjaxLoadingPanel1.Skin = skinName;
RadAjaxLoadingPanel1.EnableEmbeddedBaseStylesheet =
false
;
RadAjaxLoadingPanel1.EnableEmbeddedSkins =
false
;
//context menu
cm.Skin = skinName;
cm.EnableEmbeddedBaseStylesheet =
false
;
cm.EnableEmbeddedSkins =
false
;
gcm.Skin = skinName;
gcm.EnableEmbeddedBaseStylesheet =
false
;
gcm.EnableEmbeddedSkins =
false
;
//radWindow
cwPrintWindow.Skin = skinName;
cwPrintWindow.EnableEmbeddedBaseStylesheet =
false
;
cwPrintWindow.EnableEmbeddedSkins =
false
;
string
telerikAssembly =
typeof
(RadGrid).Assembly.FullName;
//string telerikAssembly = "";
string
telerikSkinsAssembly =
typeof
(Telerik.Web.UI.Skins.RadGrid).Assembly.FullName;
//string telerikSkinsAssembly = "";
string
[] components = {
"ToolBar"
,
"Input"
,
"Grid"
,
"Menu"
,
"ComboBox"
,
"Calendar"
,
"Menu"
,
"Window"
};
if
(RadStyleSheetManager.GetCurrent(wp.Page) !=
null
) cssManager = RadStyleSheetManager.GetCurrent(wp.Page);
for
(
int
i = 0; i < components.Length; i++)
{
cssManager.StyleSheets.Add(
new
StyleSheetReference(
"Telerik.Web.UI.Skins."
+ skinName +
"."
+ components[i] +
"."
+ skinName +
".css"
, telerikSkinsAssembly));
cssManager.StyleSheets.Add(
new
StyleSheetReference(
"Telerik.Web.UI.Skins.Default."
+ components[i] +
".Default.css"
, telerikAssembly));
cssManager.StyleSheets.Add(
new
StyleSheetReference(
"Telerik.Web.UI.Skins."
+ components[i] +
".css"
, telerikAssembly));
}
But for some reason the combined css file is rendered empty, and nothing is styled. What am I missing?