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

Left scroll button doesn't work after scrollIntoView()

1 Answer 133 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Brent
Top achievements
Rank 1
Brent asked on 14 Aug 2009, 04:35 PM
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

 


1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 21 Aug 2009, 08:30 AM
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.
Tags
TabStrip
Asked by
Brent
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or