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

Opening latest radtabitem

2 Answers 36 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
VeeraMalleswaraRao Gali
Top achievements
Rank 1
VeeraMalleswaraRao Gali asked on 24 Jun 2010, 11:53 AM
Hi,
I am dynamically adding a radtabitem to radtabcontrol, now i want to see the latest ( newly added ) radtabitem by default.
I am doing operations from  radtabcontrol which is parent for newly added radtabitem.

Regards,
Malli.

2 Answers, 1 is accepted

Sort by
0
VeeraMalleswaraRao Gali
Top achievements
Rank 1
answered on 25 Jun 2010, 07:57 AM
Hi,

Any body is there to help ?

Regards,
Malli.
0
Tina Stancheva
Telerik team
answered on 29 Jun 2010, 02:45 PM
Hi VeeraMalleswaraRao Gali,

If the item is added as last item, you can use the following code to select the newly added item:
private void AddTab(object sender, RoutedEventArgs e)
{
    RadTabItem itemToAdd = new RadTabItem()
    {
        Header = "New Tab"
    };
    radTabControl.Items.Add(itemToAdd);
    (radTabControl.Items[radTabControl.Items.Count - 1] as RadTabItem).IsSelected = true;
}

Give this approach a try and let me know if it works for you.

Best wishes,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TabControl
Asked by
VeeraMalleswaraRao Gali
Top achievements
Rank 1
Answers by
VeeraMalleswaraRao Gali
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or