Panels never expanding on load/start

3 posts, 1 answers
  1. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 03 Jan 2012 Link to this post


    I'm using the panelbar and whant the first panel to expand, on start.

    This is my panel code:
    <telerik:RadPanelBar ID="RadPanelBar_Portfolio" Width="100%" Height="100%" CssClass="masterPanelBar"
        ExpandMode="FullExpandedItem" runat="server" >
            <telerik:RadPanelItem Value="MainPanel" Selected="true" Expanded="True">
                    <asp:label ID="Label8" Text="Portfolio" Font-Bold="true" runat="server" />   
                    <table id="tbl_HeaderPortFolio" runat="server">

    The panel bar is inside a RadSplitter.
    The radsplitter is inside a dynamically loaded control, that is in a RadAjaxPanel.

    As you can see, I set Selected="true" Expanded="True" 
    but that does not show the panel expanded. I always have to click the bar to see its content (the table)

    I tried also to set it in code :
    With RadPanelBar_Portfolio.FindItemByValue("MainPanel")
        .Expanded = True
        .Selected = True
        .Expanded = True
        .PreventCollapse = True
    End With
    and even in the PreRender (RadPanelBar_Portfolio.Items(0).Expanded = True)

    and I tried setting it in JS:
    function ExpandItem()
        var panelbar = <%= RadPanelBar_Portfolio.ClientID %>;
        var item = panelbar.FindItemByValue("MainPanel");
        if (item)
            //alert("Item with text 'MainPanel' not found.");

    But, no luck, the panelbar ALWAYS needs to be clicked first...

    Please check screenshot for more details.

    Could you tell me how I can see the first panel expanded?


  2. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 03 Jan 2012 Link to this post

    when I remove the <HeaderTemplate> it is no longer a problem?!
  3. Answer
    Kate avatar
    1898 posts

    Posted 04 Jan 2012 Link to this post

    Hi Erik,

    Indeed the behavior that you encounter is a bug of the RadPanelBar control when you use both HeaderTemplate and ContentTemplate that we are already aware of. It is already logged in our internal system and though I can not give you any specific timeframe we will do our best so that we can fix it shortly.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top