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

Panels never expanding on load/start

2 Answers 70 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 2
Erik asked on 03 Jan 2012, 04:27 PM
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

2 Answers, 1 is accepted

Sort by
0
Erik
Top achievements
Rank 2
answered on 03 Jan 2012, 05:35 PM
when I remove the <HeaderTemplate> it is no longer a problem?!
 
0
Accepted
Kate
Telerik team
answered on 04 Jan 2012, 09:35 AM
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
Tags
PanelBar
Asked by
Erik
Top achievements
Rank 2
Answers by
Erik
Top achievements
Rank 2
Kate
Telerik team
Share this question
or