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

Does Collapsible Panel RadControl exist for ASP.NET AJAX

3 Answers 806 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kathleen Johnson
Top achievements
Rank 1
Kathleen Johnson asked on 20 Apr 2010, 08:58 PM
Hello,

I am attempting to create a dynamic site where different customers have their own logos, colors, etc.  I have the need for collapsible panels where I need to easily be able to customize the background color, font type, expand/collapse controls, expand/collapse control position (i.e. left or right).  It seems that if I use the RadPanel, nothing will be easy as a skin would need to be customized for every customer (which is an enormous effort on a short development timeframe) since it seems that the actual panel background color is not set via a style, but included inside an image.. 

Is there a way to set the panel colors via a style where a skin does not need to be created? 


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadPanelBar.aspx.cs" Inherits="Test.RadPanelBar" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title></title>  
    <style type="text/css">  
    .PanelBackGround  
    {  
        color:green !important;  
    }  
    </style> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> 
    <table> 
        <tr> 
            <td> 
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
                    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="MultipleExpandedItems" > 
                        <Items> 
                            <telerik:RadPanelItem Text="Provider Information" Expanded="true">  
                                <Items> 
                                    <telerik:RadPanelItem Value="Provider" runat="server" CssClass="PanelBackGround">  
                                        <ItemTemplate> 
                                                <table> 
                                                    <tr> 
                                                        <td><asp:Label ID="lblName" runat="server" Text="Name" /></td>  
                                                        <td><asp:TextBox ID="txtName" runat="server" /></td>  
                                                    </tr> 
                                                </table> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                            <telerik:RadPanelItem Text="Sign In & Security" Expanded="false">  
                                <Items> 
                                    <telerik:RadPanelItem Value="SignIn" runat="server">  
                                        <ItemTemplate> 
                                                <table> 
                                                    <tr> 
                                                        <td><asp:Label ID="lblEmail" runat="server" Text="Email Address" /></td>  
                                                        <td><asp:TextBox ID="txtEmail" runat="server" /></td>  
                                                    </tr> 
                                                </table> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                        </Items> 
                    </telerik:RadPanelBar> 
                </telerik:RadAjaxPanel> 
            </td> 
        </tr> 
    </table> 
    </form> 
</body> 
</html> 
 

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 22 Apr 2010, 10:09 AM
Hi Kathleen Johnson,

Please check this online example which demonstrates the use of custom css classes in RadPanelBar.

Kind regards,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Konda
Top achievements
Rank 1
answered on 18 Jan 2013, 09:21 AM
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
                    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" ExpandMode="MultipleExpandedItems" > 
                        <Items> 
                            <telerik:RadPanelItem Text="Provider Information" Expanded="true">  
                                <Items> 
                                    <telerik:RadPanelItem Value="Provider" runat="server" CssClass="PanelBackGround">  
                                        <ItemTemplate> 
                                                <table> 
                                                    <tr> 
                                                        <td><asp:Label ID="lblName" runat="server" Text="Name" /></td>  
                                                        <td><asp:TextBox ID="txtName" runat="server" /></td>  
                                                    </tr> 
                                                </table> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                            <telerik:RadPanelItem Text="Sign In & Security" Expanded="false">  
                                <Items> 
                                    <telerik:RadPanelItem Value="SignIn" runat="server">  
                                        <ItemTemplate> 
                                                <table> 
                                                    <tr> 
                                                        <td><asp:Label ID="lblEmail" runat="server" Text="Email Address" /></td>  
                                                        <td><asp:TextBox ID="txtEmail" runat="server" /></td>  
                                                    </tr> 
                                                </table> 
                                        </ItemTemplate> 
                                    </telerik:RadPanelItem> 
                                </Items> 
                            </telerik:RadPanelItem> 
                        </Items> 
                    </telerik:RadPanelBar> 
                </telerik:RadAjaxPanel> 
0
sln007
Top achievements
Rank 1
answered on 23 Jan 2014, 05:20 PM
Hello,

I am close to implementing an approach based your example.

Can you supply a snippet of code shwing the reference to setting the lblName or txtName objects?

Thanks.
Tags
General Discussions
Asked by
Kathleen Johnson
Top achievements
Rank 1
Answers by
Yana
Telerik team
Konda
Top achievements
Rank 1
sln007
Top achievements
Rank 1
Share this question
or