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

2 level tabstrip problem

7 Answers 155 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 08 Sep 2008, 08:55 PM
Hi folks, quick little problem

I have a two level tabstrip.  When I click on the tabitem that has the second level, the second level tabs do not show.
This ONLY occurs if the top level tab has navigateurl

Sample below.
How Do I get around this, so that the second level menu shows?


<telerik:RadTabStrip ID="RadTabStrip1" runat="server">

<Tabs>

<telerik:RadTab runat="server" Text="Root RadTab1" NavigateUrl="webform1.aspx" Selected="True">

<Tabs>

<telerik:RadTab runat="server" Text="Child RadTab 1">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="Child RadTab 2">

</telerik:RadTab>

</Tabs>

</telerik:RadTab>

<telerik:RadTab runat="server" Text="Root RadTab2">

</telerik:RadTab>

<telerik:RadTab runat="server" Text="Root RadTab3">

</telerik:RadTab>

</Tabs>

</telerik:RadTabStrip>

7 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Sep 2008, 06:46 AM
Hi Bob,

This is by design. Tabs which have their NavigateUrl set navigate instead of showing their children.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bob
Top achievements
Rank 1
answered on 09 Sep 2008, 02:14 PM
OK, not quite intuitive.

So, how do I click on a top level tab item, display the second level tabs, and navigate to the first url of the second level tabs?

I also want to have the current tab selected once the url displays.

I have the tabstrip in a master page, and am navigating to content pages via the tabstrips navigateurl.

It's kind of complex to distill into a sample I can post.
0
Bob
Top achievements
Rank 1
answered on 09 Sep 2008, 02:33 PM
Hang on, the CSS was preventing the second level from showing.

I'll post here again if I still need more help.
0
Atanas Korchev
Telerik team
answered on 09 Sep 2008, 02:38 PM
Hi Bob,

Please check this online example. It demonstrates how to select the tab which corresponds to the current url. It is possible to navigate to the url of the first child by using the client-side API. You need to use the OnClientTabSelected event and call the click method of the first child tab. Check this topic for more details on the client-side API of RadTabStrip.

All the best,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bob
Top achievements
Rank 1
answered on 09 Sep 2008, 02:48 PM
OK, still have a problem.
I have a menu tab structure in a master page as follows:

<telerik:RadTabStrip ID="tsMenu" runat="server"  Font-Size="XX-Small" Skin="WebBlue">
    <Tabs>
        <telerik:RadTab runat="server" Text="a" NavigateUrl="a.aspx">
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="B" >
            <Tabs>
                <telerik:RadTab runat="server" Text="b1"  NavigateUrl="b1.aspx">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="b2" NavigateUrl="b2.aspx">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="b3" NavigateUrl="b3.aspx">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="c" NavigateUrl="c.aspx">
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="d" NavigateUrl="d.aspx">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>

Now, on each top level page, I have server code to set the correct selected tab, in a.aspx:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        CType(Master.FindControl("tsMenu"), RadTabStrip).FindTabByText("").Selected = True
    End Sub

The question is, what do I do to set the second level selected tab?
Selecting it by text leaves no tab selected.
Selecting it by text of "b" gets the top level selected, and displays the second level, but I just can't get the second level selected.

thanks in advance.

( by the way, there are quite a few Pages in the tab structure, this is a simplified structure.  I want it busted out over multiple physical content pages otherwise a single monolithic page with multipage would be unmanageable. )
0
Atanas Korchev
Telerik team
answered on 10 Sep 2008, 08:24 AM
Hello Bob,

Why are you passing empty string to the FindTabByText method? Anyway to select a second level tab use the Tabs collection of its parent tab:

firstLevelTab.Tabs(0).Selected = true
firstLevelTab.Selected = true

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
shruthi
Top achievements
Rank 1
answered on 10 Aug 2011, 01:27 PM
Please let me know what was the css issue. I am trying it from 2 days..but not able to find out. please help.
Tags
TabStrip
Asked by
Bob
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Bob
Top achievements
Rank 1
shruthi
Top achievements
Rank 1
Share this question
or