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

RadTabControl with RadGridview as TabItem and complex collections

1 Answer 57 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Masha
Top achievements
Rank 1
Masha asked on 27 Jul 2011, 08:21 PM
Hello,

I'm trying to implement the following:

<telerik:RadTabControl
           x:Name="Stage"
           ItemsSource="{Binding DistributionList}"
           DisplayMemberPath="Name"
           TabStripPlacement="Left"
           TabOrientation="Horizontal">
 
           <telerik:RadTabItem>
               <telerik:RadGridView
                   Name="Recipients"
                   ItemsSource="{Binding Recipients}">
 
                         .........
 
                       </telerik:RadGridView>
           </telerik:RadTabItem>
 
       </telerik:RadTabControl>

I have a collection of "DistributionLists" in the view model. Each item in this collection has a child collection "Recipients". I would like to show the Recipients in a GridView inside the TabItem of the TabControl but this doesn't seem to work. I'm not even getting the grid on the tab.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 01 Aug 2011, 11:39 AM
Hi Masha,

In the code you pasted I see that you're populating the TabControl both through its ItemsSource and Items collection (adding a TabItem declaratively). This approach is not valid. You have to use either ItemsSource or Items but not both. I've modified you're code to demonstrated what I have in mind. Please take a look at the attached project and let me know if you have further questions.

All the best,
Kiril Stanoev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
TabControl
Asked by
Masha
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or