This is a migrated thread and some comments may be shown as answers.

Collapse on directory change?

1 Answer 46 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Arroyocode
Top achievements
Rank 1
Arroyocode asked on 25 Aug 2008, 07:00 AM
Hello telerik, we currently have Rad PanelBar Q2 2007 deployed via master page with PersistStateInCookie="true". We need the ability to reset the cookie/delete/etc when a user leaves a directory on the site for another.

If user is here:

www.site.com/dir1

and clicks a link taking them to:

www.site.com/dir2

we would like to fully collapse our panelbar but keep the persistence state active while they're in the current section and handle it via code-behind.

We found and have deployed this(http://www.telerik.com/community/forums/thread/b311D-mbtca.aspx) using the example via Javascript added via onload event. It works, but we're trying to avoid the collapse animation that happens when the page is loaded, rather, only show a fully collapsed menu immediately from refresh.

Does this make sense? and thank you!

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 03 Sep 2008, 08:15 AM
Hello Greg,

Loading the panelbar state occurs during the Prerender stage. If you subscribe to the PreRender event of RadPanelbar you would be able to expand/collapse any items you want thus overriding the state loaded from the cookie.

Sincerely yours,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
Arroyocode
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or