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

How to get focus on a new tab added to Radstrip?

1 Answer 178 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.
Era
Top achievements
Rank 1
Era asked on 03 Apr 2008, 09:13 AM
Hi,

I am new to RadControls.

In my code base, I have created a tabstrips and an "Add Tab" button. 
I have also set scroll property of Tabstrip to allow scrolling.

On click of the "Add Tab" button I programmatically add a new tab item to the tabstrip and select it. However, I cannot get focus on the newly added tab.
If the count of tabs grows, I need to scroll to the added tab.

Is there some way by which at the time of selecting a tab I also set focus on it?

Any help shall be appreciated.

Thanks in anticipation,

Era

1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 03 Apr 2008, 04:32 PM
Hi Era,

Thank you for writing.

We have already implementd programmatic scrolling to a desired tab in the RadTabStrip. It will be a part of our Q1 2008 release, due in mid-April. Currently, I could suggest adding a new tab at the first position. In this way, it will always be visible.

Please take a look at code-block below as reference:

private void radButton1_Click(object sender, EventArgs e)  
{  
    TabItem tab = new TabItem(String.Format("Tab{0}",this.radTabStrip1.Items.Count + 1));  
    this.radTabStrip1.Items.Insert(0, tab);  
    this.radTabStrip1.SelectedTab = tab;  

I hope this helps. If you have additional question, do not hesitate to contact me again.

Sincerely yours,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
Era
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or