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

PanelBar is not expanding/showing Items

1 Answer 67 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Niko
Top achievements
Rank 1
Niko asked on 26 Jul 2012, 02:41 AM
I have a PanelBar that is getting populated client-side via JS.  Below is a code example:

var panel = $find('RadPanelBar');
var rootItem = panel.findItemByText("RootItem");
for (var i = 0; i < array.length; i++) {
    var item = new Telerik.Web.UI.RadPanelItem();
    item.set_text(array[i].someText);
    panel.trackChanges();
    rootItem.get_items().add(item);
    panel.commitChanges(); 
}

This seems to serve it's purpose, I can inspect the root item after the loop and can see all the added child items.  

The problem is when I click on this RadPanelBar root item, nothing happens.  The "expand/collapse" icon switches on click and any expand/collapse/click events are fired as normal, just no child Items are shown.  I have tried almost everything.

Even when adding the RadPanelItems statically at design time, I see the same problem.  
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="100%" Height="600px">
    <Items>
        <telerik:RadPanelItem runat="server" Text="TestRoot" Expanded="True">
            <Items>
                <telerik:RadPanelItem Text="TestChild">
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>      
</telerik:RadPanelBar>

This also has the same outcome, can't expand to see the child item.

Any ideas?  Am I missing something?

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 30 Jul 2012, 08:52 AM
Hello Niko,

I tested the issue that you describe but I could not get the described behavior. Here is a short video demonstrating how the control behaves from my side.

Kind regards,
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
Niko
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or