RadPanelBar Loses State When Moving From Page To Page

4 posts, 1 answers
  1. Larry
    Larry avatar
    33 posts
    Member since:
    Apr 2009

    Posted 21 Apr 2009 Link to this post

    Hey,

    I'm working with a RadPanelBar in a master page.   The menu is three levels deep and I'm using a datasource to populate the menu options.  The problem I'm having is when I go from menu option to menu option the menus collapse each time. I'd like to keep the menu expanded as the user goes from page to page.  I've tried "PersistStateInCookie" but sometimes it works and sometimes it does not.  Any Suggestions would be appreciated.

    Thanks,
    Larry
  2. Sergio Cortez
    Sergio Cortez avatar
    23 posts
    Member since:
    Nov 2008

    Posted 21 Apr 2009 Link to this post

    Hi Larry
    To provide this behavior i use the following code in my Page_Load event

     RadPanelItem radItem = myradPanelBar.FindItemByUrl(Request.Url.ToString());
                if (radItem != null)
                {
                    radItem.Selected = true;
                    radItem.Expanded = true;
                }

    This code will get the Item related to a given URL and select and expand this RadPanelItem.

    Hope it helps
  3. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 23 Apr 2009 Link to this post

    Hi Larry,

    Please take a look at our Programmatic State Persistence example for details on the matter.

    Sincerely yours,
    Paul
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  4. Larry
    Larry avatar
    33 posts
    Member since:
    Apr 2009

    Posted 29 Apr 2009 Link to this post

    Thanks all who responded.

    Paul,
    The demo was helpful.
Back to Top