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

Get From Control within content panel

1 Answer 40 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.
Bex
Top achievements
Rank 1
Bex asked on 05 Mar 2009, 04:09 PM
Hi

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?

Thanks

Bex

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 06 Mar 2009, 05:54 PM
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,
Nick
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.
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
Bex
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or