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

Persist tab after navigation

3 Answers 118 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 12 Nov 2008, 07:40 PM
Hi,
I have one tabstrip with two tabs, attached to a multipage with two pageviews. In each pageview there is a panelbar. 
It's kind of a product menu, tab 1 is showing product categories in a specified sorted order and the tab 2 is showing them in alphabetic order.
Now:
If I click on tab 2 to see the categories alphabeticly and then click on a category to navigate to that page the tab is reset to the first tab.
How can I persist the tabs to stay on no. 2 (and pageview no. 2)?

   <telerik:RadTabStrip ID="RadTabStrip1"  
        runat="server" Skin="Black" SelectedIndex="1"  
        MultiPageID="radMultiPageCategories" EnableEmbeddedSkins="False"
        <Tabs> 
            <telerik:RadTab runat="server" PageViewID="radPageViewSorted" Text="Kategorier" Selected="True"
            </telerik:RadTab> 
            <telerik:RadTab runat="server" PageViewID="radPageViewAlphabetic" Text="A-Ö"
            </telerik:RadTab> 
        </Tabs> 
    </telerik:RadTabStrip> 
     
    <telerik:RadMultiPage ID="radMultiPageCategories" runat="server" Width="100%"  
        SelectedIndex="0"
        <telerik:RadPageView runat="server" ID="radPageViewSorted"
            <telerik:RadPanelBar ID="radPanelBarSorted" runat="server"  
                onitemdatabound="radPanelBarSorted_ItemDataBound" Skin="Default" 
                EnableEmbeddedSkins="False" Width="100%" PersistStateInCookie="False"
                <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
                <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
            </telerik:RadPanelBar> 
        </telerik:RadPageView> 
        <telerik:RadPageView runat="server" ID="radPageViewAlphabetic"
            <telerik:RadPanelBar ID="radPanelBarAlphabetic" runat="server"  
                onitemdatabound="radPanelBarAlphabetic_ItemDataBound" Skin="Default" 
                EnableEmbeddedSkins="False" Width="100%" PersistStateInCookie="False"
                <CollapseAnimation Type="None" Duration="100"></CollapseAnimation> 
                <ExpandAnimation Type="None" Duration="100"></ExpandAnimation> 
            </telerik:RadPanelBar> 
        </telerik:RadPageView> 
    </telerik:RadMultiPage> 

3 Answers, 1 is accepted

Sort by
0
Mattias
Top achievements
Rank 1
answered on 12 Nov 2008, 08:48 PM
Fixed! :)

I just added "&tab=0" and "&tab=1" to the navigate urls in each panelbar. Then I just check the querystring and set the selectedIndex of the tabstrip and multipage.
0
Paul
Telerik team
answered on 13 Nov 2008, 10:43 AM
Hi Mattias,

Please refer to our Site Navigation example that shows the needed approach.

Sincerely yours,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mattias
Top achievements
Rank 1
answered on 13 Nov 2008, 11:13 AM
Hi Paul,
No it doesn't! :)
It's just client side events when swithing tabs, no navigation.

But it doesn't matter, it works fine with my solution above.
Tags
TabStrip
Asked by
Mattias
Top achievements
Rank 1
Answers by
Mattias
Top achievements
Rank 1
Paul
Telerik team
Share this question
or