RadTabStrip - selected tab

Posted on 2011-04-30
Medium Priority
Last Modified: 2012-06-27
I have RadTabStrip from Telerik.
In a javascript function I would like to find the index of the selected tab. How is best to do that?
Question by:johnkainn
LVL 10

Accepted Solution

Asim Nazir earned 500 total points
ID: 35499253

function Enable()
       var tabStrip = <%= RadTabStrip1.ClientID %>;


I hope it helps.

Author Comment

ID: 35500218
When I do this the alert message is "Undefined".
What am I missing in this?  Attached is the code I am using.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Test_Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">

            function MyClick() {
                var tabStrip = <%= RadTabStrip1.ClientID %>;
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" CssClass="tabset" EnableEmbeddedSkins="False"
        MultiPageID="RadMultiPage1" SelectedIndex="0">
            <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="active" Text="Tab1"
            <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="active" Text="Tab2">
            <telerik:RadTab runat="server" CssClass="tab" SelectedCssClass="active" Text="Tab3">
    <input id="Button1" type="button" value="button" onclick="MyClick()" />

Open in new window


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month17 days, 7 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question