2 level tabstrip problem

8 posts, 0 answers
  1. Bob
    Bob avatar
    29 posts
    Member since:
    Jul 2008

    Posted 08 Sep 2008 Link to this post

    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>

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 09 Sep 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bob
    Bob avatar
    29 posts
    Member since:
    Jul 2008

    Posted 09 Sep 2008 Link to this post

    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.
  5. Bob
    Bob avatar
    29 posts
    Member since:
    Jul 2008

    Posted 09 Sep 2008 Link to this post

    Hang on, the CSS was preventing the second level from showing.

    I'll post here again if I still need more help.
  6. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 09 Sep 2008 Link to this post

    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.
  7. Bob
    Bob avatar
    29 posts
    Member since:
    Jul 2008

    Posted 09 Sep 2008 Link to this post

    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. )
  8. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 10 Sep 2008 Link to this post

    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.
  9. shruthi
    shruthi avatar
    6 posts
    Member since:
    Jan 2011

    Posted 10 Aug 2011 Link to this post

    Please let me know what was the css issue. I am trying it from 2 days..but not able to find out. please help.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017