Try Now
More in this section

Forums / Designing with Sitefinity / Expanding only the top node in sitepanelbar

Expanding only the top node in sitepanelbar

2 posts, 0 answered
  1. eraashishgupta
    eraashishgupta avatar
    50 posts
    26 Nov 2008
    06 Dec 2008
    Link to this post
    Hi in my left sidebar i am using sitepanelbar control and my requirement is to have first node expanded by default and rest node collapsed is there any property of rad sitepanelbar by which i can achieve this.

    Thanks for help
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    25 Oct 2016
    08 Dec 2008
    Link to this post
    Hello Aashish

    If you have SitePanel bar on  a page, the first node is selected and expanded by default. See the attached screenshot and code snippet from the SitePanelBar code behind.

    foreach (RadPanelItem item in RadPanelbar1.GetAllItems()) 
                        if (currentUrl.Equals(item.ResolveUrl(item.NavigateUrl), StringComparison.OrdinalIgnoreCase)) 
                            item.Selected = true
                            item.Expanded = true

    Let me know if your approach is different.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered