Get the expanded/collapsed status of PanelBar rootitems, to process server-side

4 posts, 0 answers
  1. Johan_Stork
    Johan_Stork avatar
    168 posts
    Member since:
    Nov 2006

    Posted 05 Jan 2007 Link to this post


    r.a.d.controls version

    RadPanelBar 4.0.3            

    .NET version

    ASP.NET 2.0

    Visual Studio version


    programming language

    VB.NET & JavaScript

    browser support

    all browsers supported by r.a.d.controls

    Here is a method to determine the status of a RadPanelBar RootItem (expanded/collapsed), so you can process it server-side, like saving it to a database or cookie as a user preference.

    Step 1 - create a .aspx webpage
    Step 2 - Add a RadPanelBar, you can fill the PanelBar manually or programmatically
    Step 3 - Add a button
    Step 4 - Add a javascript function EnumeratePanelBarRootItems() to the bottom of the webpage. When the button is clicked, this javascript code gets the statusses of the rootitems and puts them in the hidden fields
    Step 5 - In the Page_Load of the code-behind file, create the hidden form fields
    Step 6 - In the Page_Load, add a javascript attribute to the Click event of the button
    Step 7 - In the Butoon_Click event, put the code that gets the values of the hidden fields and puts them in label, or if you want a database or cookie.

    Good luck!

  2. Paul
    Paul avatar
    4281 posts

    Posted 08 Jan 2007 Link to this post

    Hello Johan,

    Thank you for your submission - your telerik points have been updated.

    Sincerely yours,
    the telerik team
  3. Doug
    Doug avatar
    73 posts
    Member since:
    Mar 2008

    Posted 07 May 2008 Link to this post


    I realize this post is over a year old.  However, I believe I am trying to accomplish what your solution provides.

    My goal is to maintain the panelbar status when a link has been selected that essentially reloads a new page.  I want those items that were open to still be expanded, and those that were not open to be collapsed.

    I see other posts about populating Session values.  Do you have an opinion as to what works best?


  4. John
    John avatar
    1 posts
    Member since:
    Jun 2008

    Posted 23 Jun 2008 Link to this post

    I am in the same situation as Doug. Any update to this?
Back to Top