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

online help / client side call fail: panelItem.expand()

1 Answer 32 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Mario
Top achievements
Rank 2
Mario asked on 08 Dec 2010, 10:48 AM
Hi,

just wanted to expand my panelbar client side and found the code in the online documentation. But it didn't work, but i i found another working way.

- not working:

http://www.telerik.com/help/aspnet-ajax/panel_clientsidebasics.html

function expandItem(text)
{
var panelBar = $find("<%= RadPanelBar1.ClientID %>");
var item
= panelBar.findItemByText(text);
if (item)
{
  
item.expand();
}
else
{
  
alert("Item with text not found.");
}
}


- working:

function ExpandPanelBarItem()
            {
                var panelBar = $find("<%= RadPanelBar1.ClientID %>");
                panelBar.get_allItems()[0].expand();
            }

(Care -> in this example this is enough because its just 1 panelbaritem in the panelbar which i want to be opened.)

- Mario

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 13 Dec 2010, 02:52 PM
Hi Mario,

I've tested the code from the help article and it works without a problem at our side. Can you send us a sample page demonstrating the problem?

Greetings,
Yana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
PanelBar
Asked by
Mario
Top achievements
Rank 2
Answers by
Yana
Telerik team
Share this question
or