Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > PanelBar > Panels never expanding on load/start

Answered Panels never expanding on load/start

Feed from this thread
  • Posted on Jan 3, 2012 (permalink)

    Hi,

    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" >
        <Items>
            <telerik:RadPanelItem Value="MainPanel" Selected="true" Expanded="True">
                <HeaderTemplate>
                    <asp:label ID="Label8" Text="Portfolio" Font-Bold="true" runat="server" />   
                </HeaderTemplate>
                <ContentTemplate>
                    <table id="tbl_HeaderPortFolio" runat="server">
                        <tr>
    ....
                        </tr>
                    </table>
                </ContentTemplate>
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>

    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)
        {
            item.Expand();
        }
        else
        {
            //alert("Item with text 'MainPanel' not found.");
        }
    }
     
    ExpandItem;

    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?

    Thanks

    Erik
    Attached files

    Reply

  • Posted on Jan 3, 2012 (permalink)

    when I remove the <HeaderTemplate> it is no longer a problem?!
     

    Reply

  • Answer Kate Kate admin's avatar

    Posted on Jan 4, 2012 (permalink)

    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.

    Greetings,
    Kate
    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > PanelBar > Panels never expanding on load/start
Related resources for "Panels never expanding on load/start"

[  ASP.NET PanelBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]