How to reference a difference style sheet for nested user controls

2 posts, 0 answers
  1. Michael Sheppard
    Michael Sheppard avatar
    6 posts
    Member since:
    May 2007

    Posted 13 Jan 2010 Link to this post

    I am using nested user controls and web controls in my PanelBar Items.  They are reused outside of my Panelbar in other parts of the app.  They already have style sheets and css classes assigned to them.  When I drop the controls into the panel bar they no longer use those but inherit from the PanelBars default stylesheet.  How to do I reference the other stylesheet? Is there a way to use a custom skin for the Panelbar but still have the nested controls use their own style sheet?

    <div id="ICEmploymentRole" runat="server">  
           <telerik:RadPanelBar runat="server" ID="RadPanelBarICE" Width="1024px" ExpandMode="SingleExpandedItem" AllowCollapseAllItems="true">  
            <telerik:RadPanelItem Text="My Internal Controls Criteria" runat="server" > 
            <telerik:RadPanelItem runat="server" Value="templateHolder" > 
                 <div class="notificationcontainer">       
                 <asp:Label ID="lblICEConfirmationMsg" runat="server" Visible="False" CssClass="notification"></asp:Label> 
                 <asp:Label ID="lblICEErrMsg" runat="server" CssClass="error" Visible="False"></asp:Label></div>  
                 <asp:GridView ID="grdIceCriteriaList" runat="server"   
                        <asp:BoundField DataField="CriteriaName" HeaderText="Name" /> 
                        <asp:BoundField DataField="VPAreaDesc" HeaderText="VP Area" SortExpression="VPAreaDesc" /> 
                        <asp:BoundField DataField="OrgGrpDesc" HeaderText="Sch/Coll/Dept Grp" /> 
                        <asp:BoundField DataField="DeptIDDesc" HeaderText="Dept" SortExpression="DeptIDDesc" /> 
                        <asp:TemplateField HeaderText="Default">  
                                <asp:Literal ID="RadioButtonMarkup" runat="server" ></asp:Literal>&nbsp;  
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" 
                                    <asp:LinkButton ID="lnkbtnEdit" runat="server" CausesValidation="False" CommandName="Edit" 
                                    <asp:LinkButton ID="lnkbtnDel" runat="server" CausesValidation="False" CommandName="Delete" 
                                        OnClientClick="return DeleteDataConfirmation(this)" Text="Delete"></asp:LinkButton> 
                        <div class="centered">  
                       <asp:LinkButton ID="lnkbtnAddICECriteria" runat="server" OnClick="lnkbtnAddICECriteria_Click" CssClass="contentlink">Click to add new criteria</asp:LinkButton></div>  
                    <div class="mysettingsfloat">  
                   <uc2:ParamBar ID="ParamBar1" runat="server" Visible="false" /> 



  2. Yana
    Yana avatar
    4547 posts

    Posted 18 Jan 2010 Link to this post

    Hi Michael,

    There is no problem using nested controls with their styles, but in some cases the styles of panelbar really can overwrite the nested controls' styles.  You should make your styles stronger in order to give them precedence over the panelbar styles. Please check this article explaining how to do that.  If you need further assistance, contact us again.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
Back to Top