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

Code snipet not working

2 Answers 25 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
prayag ganoje
Top achievements
Rank 1
prayag ganoje asked on 03 Aug 2010, 01:48 AM
Hello,

Code snipet given on the telerik site is not working. Can you please give the updated snipet ?

Existing code:
function ExpandItem()
{
   var panelbar = <%= RadPanelBar1.ClientID %>;
   var item = panelbar.FindItemByText(text);
   if (item)
   {
       item.Expand();
   }
   else
   {
       alert("Item with text '" + text + "' not found.");
   }
}

link:
http://www.telerik.com/help/aspnet/panelbar/panelbar_client-sideapi.html

Can you please update it ?

I could make a change for the firstline :
var panelbar = $find("<%= RadPanelBarUserInfo.ClientID %>");


But it failed for the second line:
var item = panelbar.FindItemByText("AccountInformation");

2 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 04 Aug 2010, 08:06 AM
Hi Prayag,

This help article is about the classic RadPanelBar for ASP.NET, I guess that you're using RadPanelBar for ASP.NET AJAX which has a different client-side API, you can find it here.

Kind regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
prayag ganoje
Top achievements
Rank 1
answered on 04 Aug 2010, 01:56 PM
Thanks Yana for the correction.

Prayag
Tags
PanelBar
Asked by
prayag ganoje
Top achievements
Rank 1
Answers by
Yana
Telerik team
prayag ganoje
Top achievements
Rank 1
Share this question
or