RadPanelBar Collapse All items is not working

3 posts, 0 answers
  1. Amjath
    Amjath avatar
    16 posts
    Member since:
    Mar 2016

    Posted 07 Jun 2016 Link to this post

    Hello All,

    I want the RadPanelBar to load by collapsing all the items, if the user need to see and they can expand, but collapse all is not happening at all.

    In my case my datasource will be like this





    while loading the page I want to see only the Item1 alone

    Mark up code:

    <telerik:RadPanelBar ID="rdPnlOrgDetail" RenderMode="Lightweight" OnDataBound="rdPnlOrgDetail_DataBound" runat="server" OnPreRender="rdPnlOrgDetail_PreRender" AllowCollapseAllItems="true" ExpandMode="SingleExpandedItem" OnClientLoad="collapseAll">


    Dynamically adding the Items 

                var source= getSource();

                RadPanelItem orgItems = new RadPanelItem();
                orgItems.Text = string.Format("{0} : {1}", orgChart.First().OrganisationScope.Scope, orgChart.First().Name.ToString());
                orgItems.Expanded = false;

                for (int i = 1; i < orgChart.Count; i++)
                    RadPanelItem orgItem = new RadPanelItem(string.Format("{0} : {1}", orgChart[i].OrganisationScope.Scope, orgChart[i].Name.ToString()));
                    orgItem.Expanded = false;
                    orgItems.Expanded = false;
                orgItems.Expanded = false;


    please do the needful.


    With Thanks 


  2. Peter Milchev
    Peter Milchev avatar
    464 posts

    Posted 09 Jun 2016 Link to this post

    Hello Amjath,

    In the attachment, you will find the sample page, that we used to recreate the described scenario. You could use it as a reference. 

    Peter Milchev
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. Amjath
    Amjath avatar
    16 posts
    Member since:
    Mar 2016

    Posted 10 Jun 2016 in reply to Peter Milchev Link to this post

    Hello Peter Milchev,

    Still the collpase was not happening in my project.

    the radpanelbar is in the usercontrol and that control was referred in the page, will this be a problem.

    With Thanks


Back to Top