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

How to reference a difference style sheet for nested user controls

1 Answer 45 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 13 Jan 2010, 03:58 PM

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">  
        <Items> 
        <telerik:RadPanelItem Text="My Internal Controls Criteria" runat="server" > 
        <Items> 
        <telerik:RadPanelItem runat="server" Value="templateHolder" > 
            <ItemTemplate>   
             <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"   
                OnRowDeleting="grdUserCriteriaList_RowDeleting"   
                OnRowEditing="grdUserCriteriaList_RowEditing"   
                OnRowDataBound="grdICECriteriaList_RowDataBound"   
                AutoGenerateColumns="False"   
                SkinID="gridviewContentSkin"   
                CssClass="contentTable">  
                    <Columns> 
                    <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">  
                        <ItemTemplate> 
                            <asp:Literal ID="RadioButtonMarkup" runat="server" ></asp:Literal>&nbsp;  
                        </ItemTemplate> 
                    </asp:TemplateField> 
                        <asp:TemplateField> 
                            <EditItemTemplate> 
                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update" 
                                    Text="Update"></asp:LinkButton> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:LinkButton ID="lnkbtnEdit" runat="server" CausesValidation="False" CommandName="Edit" 
                                    Text="Edit"></asp:LinkButton> 
                            </ItemTemplate> 
                        </asp:TemplateField> 
                        <asp:TemplateField> 
                            <ItemTemplate> 
                                <asp:LinkButton ID="lnkbtnDel" runat="server" CausesValidation="False" CommandName="Delete" 
                                    OnClientClick="return DeleteDataConfirmation(this)" Text="Delete"></asp:LinkButton> 
                            </ItemTemplate> 
                        </asp:TemplateField> 
                       </Columns> 
                    </asp:GridView> 
                    <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" /> 
               </div> 
            </ItemTemplate> 
            </telerik:RadPanelItem> 
            </Items> 
            </telerik:RadPanelItem> 
            </Items> 
            </telerik:RadPanelBar> 
 </div> 

 

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Jan 2010, 09:38 AM
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,
Yana
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.
Tags
PanelBar
Asked by
Michael
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or