Left scroll button doesn't work after scrollIntoView()

2 posts, 0 answers
  1. Brent
    Brent avatar
    14 posts
    Member since:
    Apr 2008

    Posted 14 Aug 2009 Link to this post

    Hi,

    I am having issues with the left scroll button not working if I set the selected tab on the server side and then call scrollIntoView() in the OnClientLoad event.

    My tabstrip is configured as below:

    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" AutoPostBack="false" OnClientLoad="ScrollToActiveTab" ScrollButtonsPosition="Middle" ScrollChildren="true" PerTabScrolling="true" Width="708">

     </telerik:RadTabStrip>

     



    After adding tabs to the TabStrip programmatically, I am setting the selected tab like so:

    Telerik.Web.UI.RadTab selectedTab = RadTabStrip1.FindTabByUrl(url);

     if (selectedTab != null)

     {

    selectedTab.SelectParents();

    selectedTab.Selected = true;

     }



    Then, in the OnClientLoad event, I am calling this method:

    function ScrollToActiveTab(sender, eventArgs) {

    var selectedTab = sender.get_selectedTab();

    if (selectedTab != null) {

     selectedTab.scrollIntoView();

    }

    }



    In the browser, the correct tab is selected, and everything is rendered fine except that when I click the left scroll button to scroll to tabs that come before the selected one, I get this javascript error:

    tabs.getTab(this._currentTabIndex + _118) is undefined

     


  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 21 Aug 2009 Link to this post

    Hello,

    Thank you for reporting this issue. We've managed to reproduce it and to fix it. The fix will be available in the next internal build upload (version 2009.2.821+) that you can download from your Client.NET account. Note that you need an active trial to be able to download the latest builds.

    As a token of our gratitude for your involvement, your Telerik points have been updated.

    Regards,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top