Cannot override the skin of a single instance of a control once a custom skin has been set.

3 posts, 0 answers
  1. Ed
    Ed avatar
    15 posts
    Member since:
    Apr 2009

    Posted 06 Feb 2014 Link to this post

    In my App_Themes folder, I have a file called  In it, I set the default skins for the Telerik controls.  A sample of the contents is as follows:

    telerik:RadScheduler runat="server" Skin="Office2007" EnableEmbeddedSkins="true" />
    <telerik:RadToolBar runat="server" Skin="Custom" EnableEmbeddedSkins="false" height="23px"/>
    <telerik:RadTreeView runat="server" Skin="Custom" EnableEmbeddedSkins="false" Font-Names="Arial" Font-Size="9pt" />
    <telerik:RadDock  runat="server" Skin="Custom" EnableEmbeddedSkins="false" />
    <telerik:RadTabStrip runat="server" Skin="Custom" EnableEmbeddedSkins="false" />

    I am attempting to use the radTreeView on a page similar to your demo page showing examples for each of your controls.  So in my .aspx page I have the following:

    <telerik:RadTreeView ID="rtvTree" runat="server" EnableEmbeddedSkins="True" Skin="Silk">
            <telerik:RadTreeNode runat="server" Text="Top Ten" Value="pnlTopTen"/>
            <telerik:RadTreeNode runat="server" Text="Topic Areas" Value="pnlTopicAreas"/>

    However, my radTreeView is still being rendered using my custom skin, not the embedded skin.  I have removed the custom skin from the and it works then.  However, I would now have to change all the other locations radTreeView is being used and add the skin attribute.

    I am using Telerik 3.5 from release 2013_3.1114.

    Any help is appreciated.
  2. Magdalena
    Magdalena avatar
    487 posts

    Posted 07 Feb 2014 Link to this post

    Hi Ed,

    This issue could occur when the RadTreeView with applied Silk skin is on the page with reference to your custom skin and at the same time the custom skin has some rules without .RadTreeView_Custom in front of selectors. In this case the rules used in your custom skin can overwrite the Silk skin. To avoid this issue, please add the class .RadTreeView_Custom in front of every selector used in your custom skin.

    If the problem still occurs, I would like to ask you to provide a live URL or runnable project with reproduced issue so I can test it locally and be able to assist you in the most efficient way.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. Ed
    Ed avatar
    15 posts
    Member since:
    Apr 2009

    Posted 07 Feb 2014 in reply to Magdalena Link to this post

    I've been able to track down the issue to how themes are applied in  In the web.config file, I have

        <pages theme="abc">

    In the folder App_Themes/abc exists the skin file mentioned in my original post.  This trumps everything I try to override in the .aspx page.

    I got around this by specifying the skin in the code behind for the page in the OnInit event.

    rtvTree.EnableEmbeddedSkins = true;
    rtvTree.Skin = "Silk";
Back to Top