Question

I am using the ASPxNavBar on the master page of my sharepoint site (Sharepoint Foundation 2010). I have succefully integrated the control so that it functions properly however i am have a problem that the state of the navbar (which groups are open) is not being persisted) Here is some of the code

                              <Sharepoint:SPNavigationManager

                                id="QuickLaunchNavigationManager"

                                runat="server"

                                QuickLaunchControlId="ASPxNavBar1"

                                ContainedControl="QuickLaunch"

                                EnableViewState="false">



                                <dx:ASPxNavBar ID="ASPxNavBar1"

                                    AutoCollapse="true"

                                    Paddings-PaddingLeft="0"

                                    Paddings-PaddingRight="0"

                                    Paddings-PaddingTop="0"

                                    runat="server"

                                    GroupSpacing="0"

                                    AllowSelectItem="true"

                                    BackColor="Transparent"

                                    ForeColor="White"

                                    Width="220px"

                                    ItemLinkMode="TextOnly"

                                    EnableAnimation="true"

                                    ShowExpandButtons="true"

                                    AllowExpanding="true"

                                    ItemStyle-SelectedStyle-Font-Italic="true"

                                    ItemStyle-SelectedStyle-Font-Bold="true"

                                    ExpandImage-Url="/_layouts/images/FamilyCarePRL/Buttons/Expand.png"

                                    CollapseImage-Url="/_layouts/images/FamilyCarePRL/Buttons/Contract.png"

                                    SaveStateToCookies="True"

                                     >

                                    <GroupHeaderStyle Height="40" BackColor="Transparent">

                                        <BackgroundImage ImageUrl="/_layouts/images/FamilyCarePRL/Buttons/NavBarButtonGradient.png"

                                            Repeat="RepeatX" />

                                        <Border BorderColor="Black"></Border>

                                    </GroupHeaderStyle>

                                    <Groups>

                                        <dx:NavBarGroup Name="AboutUs" Text="About Us">

                                            <Items>

                                                <dx:NavBarItem Name="Vision" Text="Our Vision">

                                                    <Template>

                                                        <asp:ImageButton ID="ImageButton1" ImageUrl="/_layouts/images/FamilyCarePRL/Buttons/Vision.png"

                                                            PostBackUrl="<% $SPUrl:~SiteCollection/SitePages/Vision.aspx%>" runat="server" />

                                                    </Template>

                                                </dx:NavBarItem>

                                    .

                                    .

The problem is that when i click on the image button it takes you to the site page but the state of the NavBar is not persisted. I have set SaveStateToCookies to true but that doesn't seem to work. Any suggestions are much appreciated

Was it helpful?

Solution

Forgot to set the NavigateURL in the NavBarItem.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top