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

Identify Clicked Tab Index

1 Answer 101 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Narsing
Top achievements
Rank 1
Narsing asked on 18 Dec 2008, 12:25 AM
I want to identify the index of the tab clicked. I always get zero no matter if i click the first , second or third.

<

telerik:RadTabStrip ID="RadTabStrip2" runat="server" MultiPageID="RadMultiPage1" AutoPostBack =true >

 

 

<Tabs>

 

 

<telerik:RadTab PageViewID="PageView1" Text="Details">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab PageViewID="PageView2" Text="Measures">

 

 

</telerik:RadTab>

 

 

<telerik:RadTab PageViewID="PageView3" Text="Folder Tracker">

 

 

</telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

 

 

 

<telerik:RadMultiPage ID="RadMultiPage1" runat="server">

 

 

<telerik:RadPageView ID="PageView1" runat="server">

 

 

<Table><tr>Test1</tr></Table>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="PageView2" runat="server">

 

 

<Table><tr>Test2</tr></Table>

 

 

</telerik:RadPageView>

 

 

<telerik:RadPageView ID="PageView3" runat="server">

 

 

<Table><tr>Test3</tr></Table>

 

 

</telerik:RadPageView>

 

 

</telerik:RadMultiPage> 

 

Protected

Sub RadTabStrip2_TabClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTabStripEventArgs) Handles RadTabStrip2.TabClick

 

 

Select Case RadTabStrip2.TabIndex

 

 

Case 0

 

Response.Write(

"Test1")

 

 

Case 1

 

Response.Write(

"Test2")

 

 

Case 2

 

Response.Write(

"Test3")

 

 

End Select

 

 

 

 

End Sub

 

 


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Dec 2008, 05:49 AM
Hello Narsing,

You can try out the following code to get the index of the tab clicked.
Protected Sub RadTabStrip2_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) 
         Select Case e.Tab.Index 
             Case 0 
                 Response.Write("test1") 
                 Exit Select 
             Case 1 
                 Response.Write("test2") 
                 Exit Select 
             Case 2 
                 Response.Write("test3") 
                 Exit Select 
         End Select         
         
     End Sub 
 
 

Thanks
Princy.
Tags
TabStrip
Asked by
Narsing
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or