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

Issue in accesing controls inside rad tab item

1 Answer 103 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Rana Pratap
Top achievements
Rank 1
Rana Pratap asked on 18 Oct 2009, 12:37 PM
Hi telerik team,


I have a tab control structure shown below

<telerik:RadTabControl>
<telerik:RadtabItem>
<GridView></GridView>
</telerik:RadtabItem>
</telerik:RadTabControl>

Now for accessing gridview control its very simple in xaml.cs i.e  through Radtabitem.content. If i want to add two more controls inside rad tab item i am getting error saying "Content is Present more than once". If i use stack panel , i tried to access the controls but iam not able to access them. can you please suggest me better approach to have multiple controls inside radtab item and accesing them inside selection tab changed event i.e in xaml.cs file.

Thank in advance
Regards.
Rana Pratap

1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 20 Oct 2009, 07:53 AM
Hi Rana,

Yes, the TabItem is a content control and it can have only one direct child as content. You can always wrap the GridView in a panel and add the other controls there:

<telerik:RadTabControl>
<telerik:RadtabItem>
<Grid>
<GridView></GridView>
<AnotherControl></AnotherControl>
</Grid>
</telerik:RadtabItem>
</telerik:RadTabControl>

Greetings,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TabControl
Asked by
Rana Pratap
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or