Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > PanelBar > how to set radpanelbar expand first item when clicking button

Not answered how to set radpanelbar expand first item when clicking button

Feed from this thread
  • dhamodharan Intermediate avatar

    Posted on Jul 11, 2011 (permalink)

    Hi,

    I am using radpanelbar as user control(like ascx page). i am using that user control another aspx page. it is working fine. but i want expand first item when clicked button in client side. is that possible?. i can get radpanel bar in client side when clicking button. but i am not able to get radpanel item in that page. please let me know how to i set expand item manually in client side,

    I attached code let know correct way for set manually expand item for user control radpanelbar.

    var panelbar = $find('ctl00_ContentPlaceHolder1_ucInjuryeval_rpbInjuryEval'); 

    var item = panelBar.findItemByText(text);
        if (item) {
    item.expand();
    }

    i am not able to get (item). please let know how to i get.

    Thanks in advance,
    Dhamu.

    Reply

  • KwangTae avatar

    Posted on Jan 18, 2012 (permalink)

    try like below...

    panelBar.Items[0].Expanded = true;


    Reply

  • Posted on Jan 18, 2012 (permalink)

    Hello,

    Try the following javascript.
    JS:
    <script type="text/javascript">
     function OnClientClick()
      {
        var PanelBar1= $find("<%= PanelBar1.ClientID %>")
        PanelBar1.get_items().getItem(0).set_expanded(true);
      }
    </script>

    Thanks,
    Princy.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > PanelBar > how to set radpanelbar expand first item when clicking button
Related resources for "how to set radpanelbar expand first item when clicking button"

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