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

How to select a tab programmatically?

2 Answers 135 Views
Tabstrip (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Donovan Bell
Top achievements
Rank 1
Donovan Bell asked on 25 Jan 2008, 03:46 PM
Hi,

Is there a special trick to programatically select a tab? I've tried the PerformClick() method to no avail.

Thanks

2 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 28 Jan 2008, 12:44 PM
Hi Donovan,

In order to select a tab programmatically you should use set the SelectedTab property of RadTabStrip as in the example below:

DockPresenterElement presenter = ((DockPresenterControl)activeControl).DockPresenterElement; 
   foreach (TabItem tab in presenter.TabStripElement.Items) 
   { 
       if (tab.HitTest(activeControl.PointToClient(clickPoint))) 
       { 
             presenter.TabStripElement.SelectedTab = tab; 
       } 
   } 
 

I've forwarded this to the documentation team to include it in the help files.

Please, don't hesitate to write us back if you have further questions.

Best wishes,
Boyko Markov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Donovan Bell
Top achievements
Rank 1
answered on 29 Jan 2008, 08:48 AM
Great Thanks ... Worked.
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
Donovan Bell
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Donovan Bell
Top achievements
Rank 1
Share this question
or