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

Can't get RadStylesheetManager working with custom skin

3 Answers 112 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Softec
Top achievements
Rank 1
Softec asked on 04 Jun 2009, 02:01 PM
Hi

To get the functionality of RadStylesheetManager I included all files from my custom skin (derived from Telerik Default skin) in an assembly. I checked this with Reflector, all the files are correctly included and all urls are replaced with the correct WebResource link. I can access the images etc.
Additionaly I've included the StyleSheetReference in the StyleSheetManager with the name seen with Reflector and the assembly name and disabled embedded skins in all controls. 

But it isn't working, is there something more to do? I tried disabling EnableStyleSHeetCombine and OutputCompression with no luck.

When I check my source I still have href links to telerik_stylesheet for RadWindow, RadMenu, RadSplitter, RadTreeView, RadPanelBar despite having EnableEmbeddedSkins set to false... And the Telerik.Web.UI.WebResource.axd returns: 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML><HEAD
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD
<BODY></BODY></HTML> 
 

Thanks for help,
SJ

3 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 04 Jun 2009, 02:43 PM
Hi Studach Joerg,

The controls you are referring to rely on two CSS files - base CSS and skin CSS. When the EnableEmbeddedSkins property is set to false the base CSS is still output. If you don't need to modify the base css I recommend you leave it that way.
To the embedded base CSS files you should set the EnableBaseStyleSheet property to false as well. Then you need to embed and register all base css files as well. You can find them in the Skins folder of your RadControls installation - TreeView.css, Splitter.css etc.

If the problem persists please open a support ticket and send us a sample page with your setup.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Softec
Top achievements
Rank 1
answered on 04 Jun 2009, 02:57 PM
That was the problem, Thanks!
0
Jan Mucha
Top achievements
Rank 1
answered on 24 Feb 2010, 09:22 AM
Hi  i resolve this problem call custom function in PageInit.
public static void AplyCustomSkin(ControlCollection controls, String Skiname) 
        { 
            try 
            { 
                foreach (Control control in controls) 
                { 
                    if (control.GetType().ToString().Contains("Rad")) 
                    { 
                        if (control is ISkinnableControl) 
                        { 
                            (control as ISkinnableControl).EnableEmbeddedSkins = false
                            (control as ISkinnableControl).Skin = Skiname; 
                        } 
                    } 
                    if(control.Controls.Count>0) 
                    { 
                        AplyCustomSkin(control.Controls, "GopasRed"); 
                    } 
                } 
            } 
            catch 
            { 
            } 
        } 

Tags
ScriptManager and StyleSheetManager
Asked by
Softec
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Softec
Top achievements
Rank 1
Jan Mucha
Top achievements
Rank 1
Share this question
or