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

Current Tab Index and Header

1 Answer 239 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Gonzalo
Top achievements
Rank 2
Gonzalo asked on 04 Sep 2012, 08:30 PM
How do I determine current tab header and index using the RadTabControl (VB.NET)?

Thanks

G

1 Answer, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 07 Sep 2012, 01:08 PM
Hello Gonzalo,
You could use the SelectedIndex property of the RadTabControl and get the current header like this:
Dim currentIndex As Integer = Me.tabControl.SelectedIndex
 
Dim container As RadTabItem = TryCast(Me.tabControl.ItemContainerGenerator.ContainerFromIndex(currentIndex), RadTabItem)
If container IsNot Nothing Then
    Dim currentHeader As Object = container.Header
End If
If you have further questions please feel free to ask.

All the best,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TabControl
Asked by
Gonzalo
Top achievements
Rank 2
Answers by
Zarko
Telerik team
Share this question
or