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

Hierarchical Padding / Margin

2 Answers 92 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dan Andrews
Top achievements
Rank 2
Dan Andrews asked on 02 Nov 2010, 02:39 PM
How do we move the Hierarchical grid view up so that when it is expanded there is no padding or margin around it (I'm not sure if the space belongs to parent (padding) or child (margin))?  See attached

Secondly, how do we align the columns?  This works, but it's a bit of a hack:
<t:RadGridView.HierarchyChildTemplate>
    <DataTemplate>
        <t:RadGridView  ItemsSource="{Binding children}"
                        Margin="18,0,-8,0"
                        HorizontalAlignment="Stretch"
                        x:Name="childGridView"
                        Style="{StaticResource ChildRadGridViewStyle}"
                        AutoGenerateColumns="False" 
                        CanUserFreezeColumns="False"
                        Width="{Binding ElementName=childGridView, Path=ActualWidth,Mode=TwoWay}">

2 Answers, 1 is accepted

Sort by
0
Dan Andrews
Top achievements
Rank 2
answered on 03 Nov 2010, 03:09 PM
Is there an example in the Code Base that I didn't see?
0
Vanya Pavlova
Telerik team
answered on 05 Nov 2010, 05:06 PM
Hi Dan,


Generally the recommended approach is to edit the template of GridViewRow. You can find in its template the part HierarchyChildPresenter and resets its Padding property, by default this property is set to 6.

Attached is an example that demonstrates this technique.
 
Kind regards,
Vanya Pavlova
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
Dan Andrews
Top achievements
Rank 2
Answers by
Dan Andrews
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Share this question
or