Panel item back color

6 posts, 0 answers
  1. arijit
    arijit avatar
    49 posts
    Member since:
    Jun 2012

    Posted 03 Mar 2010 Link to this post

    i applied this for Item
    <

     

    telerik:RadPanelItem BackColor="Red">

    But color is not changing
    Please help

    Regards
    Arijit

     

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Mar 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Milind Raje
    Milind Raje avatar
    37 posts
    Member since:
    May 2010

    Posted 16 Feb 2012 Link to this post

    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>
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 16 Feb 2012 Link to this post

    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 >>
  6. Milind Raje
    Milind Raje avatar
    37 posts
    Member since:
    May 2010

    Posted 21 Feb 2012 Link to this post

    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
  7. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Feb 2012 Link to this post

    Hello Milind,

    Here is the link.
    CSS Skin File Selectors.

    -Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017