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

HierarchyChildTemplate expanded

3 Answers 113 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Calin Calin
Top achievements
Rank 1
Calin Calin asked on 23 Mar 2010, 02:39 PM
Hi,

I have a grid defined like this:

<Controls:RadGridView ItemsSource="{Binding Path=DishTypes}" ShowGroupPanel="False" CanUserDeleteRows="False" CanUserInsertRows="False" CanUserFreezeColumns="False" 
                                      AutoGenerateColumns="False" RowDetailsVisibilityMode="Visible" IsReadOnly="True" ShowColumnHeaders="False"  
                                      RowIndicatorVisibility="Collapsed" GridLinesVisibility="Horizontal"
                    <Controls:RadGridView.ChildTableDefinitions> 
                        <Controls:GridViewTableDefinition /> 
                    </Controls:RadGridView.ChildTableDefinitions> 
                    <Controls:RadGridView.Columns> 
                        <Controls:GridViewComboBoxColumn DataMemberBinding="{Binding Path=Id}"  
                                                         DisplayMemberPath="Name"  
                                                         SelectedValueMemberPath="Id"  
                                                         ItemsSource="{Binding Source={StaticResource dishTypeData}}" />  
                    </Controls:RadGridView.Columns> 
                    <Controls:RadGridView.HierarchyChildTemplate> 
                        <DataTemplate> 
                            <Controls:RadGridView ItemsSource="{Binding Path=MenuItems}" ShowGroupPanel="False" CanUserDeleteRows="False" CanUserInsertRows="False" CanUserFreezeColumns="False" 
                                                  AutoGenerateColumns="False" RowDetailsVisibilityMode="Visible" IsReadOnly="False" ShowColumnHeaders="False"  
                                                  RowIndicatorVisibility="Collapsed" GridLinesVisibility="Horizontal"
                                <Controls:RadGridView.Columns> 
                                    <Controls:GridViewComboBoxColumn DataMemberBinding="{Binding Path=FoodId}"  
                                                                     ItemsSource="{Binding Source={StaticResource foodData}}" 
                                                                     DisplayMemberPath="Name" 
                                                                     SelectedValueMemberPath="Id" /> 
                                    <Controls:GridViewDataColumn DataMemberBinding="{Binding Path=PortionSize}" /> 
                                </Controls:RadGridView.Columns> 
                            </Controls:RadGridView> 
                        </DataTemplate> 
                    </Controls:RadGridView.HierarchyChildTemplate> 
                </Controls:RadGridView> 


What  is the property to make all the tree children expanded (similar to clicking the + sign on all) ?

Thank you,
Calin

3 Answers, 1 is accepted

Sort by
0
Kalin Milanov
Telerik team
answered on 25 Mar 2010, 03:05 PM
Hello Calin Calin,

There is no property you can set to achieve this. Instead you can use RadGridView.ExpandAllHierarchyItems() method on DataLoaded event. 
It should do the trick.

Greetings,
Kalin Milanov
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.
0
Calin Calin
Top achievements
Rank 1
answered on 25 Mar 2010, 03:18 PM
Hi Kalin Milanov,

This is the solution I have so far, I was hoping I can avoid writing code behind.
Are you planning to add such a property in the near releases ?

Thank you,
0
Vlad
Telerik team
answered on 25 Mar 2010, 05:25 PM
Hi Calin,

Alternatively you can use row-details instead hierarchy and set RowDetailsVisibilityMode="Visible"

Best wishes,
Vlad
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.
Tags
GridView
Asked by
Calin Calin
Top achievements
Rank 1
Answers by
Kalin Milanov
Telerik team
Calin Calin
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or