Get From Control within content panel

Thread is closed for posting
2 posts, 0 answers
  1. Bex
    Bex avatar
    53 posts
    Member since:
    Jul 2011

    Posted 05 Mar 2009 Link to this post


    I have a tabstrip and within each tab page I have a lot of controls, some of which are dynamic.
    From the control I need to access the tab that it is in.. so far I have gone.. control.parent.parent and I can get to the content panel.. but how do I get the actual Tab Item from this?


  2. Nick
    Nick avatar
    767 posts

    Posted 06 Mar 2009 Link to this post

    Hello Becky,

    Thank you for your question.

    You can get the TabItem by using the AssociatedItem property of the ContentPanel. Please refer to the following code snippet:
    TabItem item = ((RadTabStripContentPanel)radButton1.Parent).AssociatedItem as TabItem;  
    this.Text = item.Text; 

    I hope this helps. If you have additional questions, feel free to contact me.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top