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

Problem with persisting state in cookie.

3 Answers 124 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Adeel
Top achievements
Rank 1
Adeel asked on 11 Jun 2009, 04:35 PM
Hi

I have implemented the radpanel bar, and using the "SPNavigationProvider" i SharePoint (MOSS 2007). I have set PersistStateInCookie to True in order to keep the menu in the right state when clicking on the links in the menu, but when I go to another site which doesn't have the rad panel bar, the panelbar on the page I left will be in the same state as I left when I open that site again. I want the menu to reset to default when I visit other sites. Is that possible?

Another problem that I have is that the menu doesn't expand when I hyperlink from another site. It just stays the way it was. Is it possible to make the menu expand when I link to a "point" in the menu?

Please advise :)

This is my code

<telerik:RadPanelBar  
        Runat="server"   
        DataSourceID="SPNavigationProvider"   
        AllowCollapseAllItems="true" 
        Skin="WebBlue"   
        ExpandMode="SingleExpandedItem"   
        PersistStateInCookie="True" 
        CollapseDelay="300"   
        EnableTheming="True"   
        Font-Bold="False"   
        ExpandDelay="300"   
         EnableViewState="true" 
        Width="215px">  
          
         <CollapseAnimation   
          Type="Linear"   
          Duration="100">  
         </CollapseAnimation> 
          
         <ExpandAnimation   
          Type="None" 
           Duration="100">  
         </ExpandAnimation> 
       </telerik:RadPanelBar> 
         
       <asp:SiteMapDataSource runat="server" ID="SPNavigationProvider" StartFromCurrentNode="true" ShowStartingNode="false"/>  
 

Regards    
    

3 Answers, 1 is accepted

Sort by
0
Thomas
Top achievements
Rank 1
answered on 10 Jul 2009, 07:42 PM
I am having the same SharePoint problem. I use the radpanel in the side quick launch. When a user selects a link from the top navigation the quick launch will always show that last item selected from there. (like top level item 1 sub item 4)

My idea is to expire the cookie after 2-3 seconds. This way if they navigate to another page it wont show. If they refresh they lose the navigation as well. Not really the best method.. open to other suggestions.

-tom
0
Paul
Telerik team
answered on 13 Jul 2009, 12:03 PM
Hi there,

You can use the approach shown in our PanelBar / Programmatic State Persistence example.

Best wishes,
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.
0
Adeel
Top achievements
Rank 1
answered on 03 Sep 2009, 09:23 PM
This sucks. I don't understand this.The least you could do was to give some instructions on how to manipulate the panelbar using code behind in SharePoint!!
Tags
PanelBar
Asked by
Adeel
Top achievements
Rank 1
Answers by
Thomas
Top achievements
Rank 1
Paul
Telerik team
Adeel
Top achievements
Rank 1
Share this question
or