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:
After adding tabs to the TabStrip programmatically, I am setting the selected tab like so:
Then, in the OnClientLoad event, I am calling this method:
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:
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