Opening latest radtabitem

3 posts, 0 answers
  1. VeeraMalleswaraRao Gali
    VeeraMalleswaraRao Gali avatar
    15 posts
    Member since:
    Jan 2010

    Posted 24 Jun 2010 Link to this post

    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. VeeraMalleswaraRao Gali
    VeeraMalleswaraRao Gali avatar
    15 posts
    Member since:
    Jan 2010

    Posted 25 Jun 2010 Link to this post

    Hi,

    Any body is there to help ?

    Regards,
    Malli.
  3. DevCraft banner
  4. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 29 Jun 2010 Link to this post

    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
Back to Top