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

Custom Skin Location not recognized

2 Answers 108 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
AL
Top achievements
Rank 1
AL asked on 09 Jan 2009, 05:48 PM
Hi,

I have followed Help Directions and Telerik Trainer video regarding Skinning as well.

The problem is my custom skin File is not being recognized or read, here are the details:

RadPanelBar is inside a UserControl.

UserControl Location: RootFolder\Controls\ascx file
Telerik Skin File Location: RootFolder\Telerik\Skins\Blue\PanelBar.Blue.css

UserControl Page:
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Blue" Width="99%" EnableEmbeddedSkins="False"
    ExpandMode="SingleExpandedItem" AllowCollapseAllItems="True">
<ExpandAnimation Type="Linear" Duration="300" />
        <CollapseAnimation Type="Linear" Duration="300"  />

    <Items>
        <telerik:RadPanelItem runat="server" Text="&nbsp;&nbsp;<b>Instructions:</b>" ImageUrl="~/App_Themes/Blue/images/InstructionsIcon.gif" ClickedCssClass="InstructionsHeading">
            <Items>
                <telerik:RadPanelItem runat="server"
                    Text="some text here">
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>

</telerik:RadPanelBar>

UserControl Code Behind File:


protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            HtmlLink link = new HtmlLink();
            link.Href = "~/Telerik/Skins/Blue/PanelBar.Blue.css";  //All definitions have been replaced with "_Blue"
            link.Attributes.Add("type", "text/css");
            link.Attributes.Add("rel", "stylesheet");
            Page.Header.Controls.Add(link);          
        }
        RadPanelBar1.Items[0].Expanded = true;
    }

Please Help!

2 Answers, 1 is accepted

Sort by
0
AL
Top achievements
Rank 1
answered on 09 Jan 2009, 07:28 PM
I removed if (!Page.IsPostBack) condition, but the problem still persists!
0
AL
Top achievements
Rank 1
answered on 09 Jan 2009, 07:45 PM
Got it. I placed the following code on pageLoad event of the aspx page that calls the userControl

HtmlLink link = new HtmlLink();
        link.Href = "~/Telerik/Skins/Blue/PanelBar.Blue.css";
        link.Attributes.Add("type", "text/css");
        link.Attributes.Add("rel", "stylesheet");
        Page.Header.Controls.Add(link);         


Tags
PanelBar
Asked by
AL
Top achievements
Rank 1
Answers by
AL
Top achievements
Rank 1
Share this question
or