Indexing Issue Tabs not change, page does.

5 posts, 0 answers
  1. Stephan
    Stephan avatar
    33 posts
    Member since:
    Jun 2012

    Posted 17 Jan 2012 Link to this post

    I have set up my tabcontrol, but when it runs it never moves off of the first one.  I think it has something to do with the
    selectedindex="0", but the builder didn't put anything in for that.  I tried the Javascript I found on here but that just generates
    an error that tabstrip.get_element())is null.

    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0"
        ontabclick="RadTabStrip1_TabClick" Skin="Black">
        <Tabs>
            <telerik:RadTab runat="server" NavigateUrl="~/Default.aspx"
                Selected="True" Text="Home">
                <Tabs>
                    <telerik:RadTab runat="server" NavigateUrl="~/Careers.aspx"
                        Text="Careers">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" NavigateUrl="~/ContactUs.aspx" 
                        Text="ContactUs">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" NavigateUrl="~/About.aspx" 
                        Text="About Us">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTab>
            <telerik:RadTab runat="server" NavigateUrl="~/Service.aspx"
                 Text="Services">
                <Tabs>
                    <telerik:RadTab runat="server" NavigateUrl="~/GetAQuote.aspx" 
                        Text="Get A Quote">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTab>
            <telerik:RadTab runat="server" NavigateUrl="~/Products.aspx"
                 Text="Products">
                <Tabs>
                    <telerik:RadTab runat="server" NavigateUrl="~/pads.aspx"  Text="Pads">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" NavigateUrl="~/holiday1.aspx" 
                        Text="Holiday Cards">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTab>
            <telerik:RadTab runat="server" NavigateUrl="~/Resources.aspx"
                 Text="Resources">
            </telerik:RadTab>
            <telerik:RadTab runat="server" NavigateUrl="~/Uploadafile.aspx"
                 Text="Up Load A File">
            </telerik:RadTab>
            <telerik:RadTab runat="server" BackColor="Transparent" Font-Bold="True"
                ForeColor="Red" Text="On-line Specials" NavigateUrl="~/Specials.aspx">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <script type="text/javascript">
        function pageLoad() {
            var tabstrip = $find("RadTab");
            $telerik.$("a", tabstrip.get_element()).bind("focus", function () {
                var index = $telerik.$("a", tabstrip.get_element()).index(this);
                tabstrip.get_tabs().getTab(index).set_selected(true);
            });
        }
    </script>

  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 20 Jan 2012 Link to this post

    Hi Stephan,

    Can you please elaborate on your scenario? What is the functionality that you trying to achieve?

    All the best,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stephan
    Stephan avatar
    33 posts
    Member since:
    Jun 2012

    Posted 20 Jan 2012 Link to this post

    If my first tab is called "Home" it is lit up and I can see my sub tabs.  If I click on the second tab "Service" it does not lite up, Home is still the active tab and the screen below changes to display service information.  I need to get the other tabs to become active. 
  5. Stephan
    Stephan avatar
    33 posts
    Member since:
    Jun 2012

    Posted 20 Jan 2012 Link to this post

    Here is what I have been able to determine.
    I have this in the HTML portion
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0"
                        ontabclick="RadTabStrip1_TabClick" Skin="Black">
                        <Tabs>
                            <telerik:RadTab runat="server" NavigateUrl="~/Default.aspx"
                                Selected="True" Text="Home">

    and i have this in my .CS file
    protected void RadTabStrip1_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)
           {
               RadAjaxManager1.Alert("You clicked on " + @"'" + e.Tab.Value + @"'");
    I have a break stop on the entery point and on the RadAjaxManager1.Alert and when i click on any of my tabs it does not break.  This tels me it is nut fireing or detecting  the "ontabclick="
  6. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 21 Jan 2012 Link to this post

    Hi Stephan,

    Make sure that when using AjaxManager you update both the page that needs to be loaded along with the RadTabstrip so that you can get the clicked tab active. Do you use any user controls and/or master and content pages? If so, I would suggest that you take a look at the following help article as well:
    • http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanager.html
    • http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html

    In case this does not help. I would recommend that you open a support ticket and send me a simplified runnable project that I can debug locally and help you out.

    Greetings,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017