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

Panel item back color

5 Answers 330 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
arijit
Top achievements
Rank 1
arijit asked on 03 Mar 2010, 04:07 PM

i applied this for Item
<

 

telerik:RadPanelItem BackColor="Red">

But color is not changing
Please help

Regards
Arijit

 

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Mar 2010, 11:38 AM
Hello Arijit,

I am not completely understood your requirement. The BackColor property for RadPanelItem is working fine in my application. I found the BackColor is not applied when there is no Text property set. Have you set Text property for panelitem? If you want, no text to appear for the item, then try the following approach and see whether it helps.

aspx:
 
    <telerik:RadPanelItem  BackColor="Green" runat="server" Text="&nbsp"
    </telerik:RadPanelItem> 

Could you provide some more information, if this does not help?

Thanks,
Princy.
0
Milind Raje
Top achievements
Rank 1
answered on 16 Feb 2012, 08:50 PM
hi, I am using the following simple code to see if I am able to change the backcolor of the first panel item. Unfortunately the setting
has no effect. Can you please tell me what am I missing?
Thanks
Milind

%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="RiskReview.WebForm1" %>
<%@ 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">
 
<head runat="server">
    <title></title>
</head>
<body>
 
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="mainScriptManager" runat="server" EnablePartialRendering="true"  > </telerik:RadScriptManager>
     <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Default" />
    <div>
    <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Height="300px">
            <Items>
                <telerik:RadPanelItem Expanded="True" Text="ASP.NET controls" BackColor="Red" >
                    <Items>
                        <telerik:RadPanelItem Text="RadMenu">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadTabStrip">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadPanelBar">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadTreeView">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="WinForms controls">
                    <Items>
                        <telerik:RadPanelItem Text="RadMenustrip">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadTabStrip">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadToolStrip">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Other projects">
                    <Items>
                        <telerik:RadPanelItem Text="SiteFinity">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="Reporting">
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem Text="RadAjax">
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
    </div>
    </form>
</body>
</html>
0
Kate
Telerik team
answered on 16 Feb 2012, 10:33 PM
Hi Milind,

In order to change the background color you will need to get the correct css class selector and increase its cpecificity. For instance when you apply the Default  skin to the RadPanelBar you can use the following css class selctor:

div.RadPanelBar_Default .rpFirst a.rpLink,
 div.RadPanelBar_Default .rpFirst div.rpHeaderTemplate,
 div.RadPanelBar_Default li.rpFirst .rpExpanded {
    background-color: red;
}

You can also refer to this article for more details on the css classes that are applied to the RadPanelBar control http://www.telerik.com/help/aspnet-ajax/panelbar-appearance-css-selectors.html

Kind regards,
Kate
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Milind Raje
Top achievements
Rank 1
answered on 21 Feb 2012, 03:44 PM
hi Kate,
Thanks for your help. On a side note the link provided doesn't work.
http://www.telerik.com/help/aspnet-ajax/panelbar-appearance-css-selectors.html
Thanks
milind
0
Shinu
Top achievements
Rank 2
answered on 22 Feb 2012, 05:27 AM
Hello Milind,

Here is the link.
CSS Skin File Selectors.

-Shinu.
Tags
PanelBar
Asked by
arijit
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Milind Raje
Top achievements
Rank 1
Kate
Telerik team
Shinu
Top achievements
Rank 2
Share this question
or