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

Remove border around the RadGridView ChildTableDefinition

3 Answers 130 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kumar
Top achievements
Rank 1
Kumar asked on 03 Jan 2012, 05:49 PM
Hello Telerik Team,

Is it possible to remove the border around the ChildTableDefinition?

See attached image where I have marked the border using red rectangles. Note that I want to remove the border completely on all sides of the child grid

Thanks,
Kumar

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 03 Jan 2012, 06:03 PM
Hello Kumar,

You need to edit the template of GridViewRow, find the Border element containing PART_HierarchyChildPresenter element and remove the default Padding. I am attaching a sample project illustrating the suggested approach.


All the best,
Maya
the Telerik team

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

0
Kumar
Top achievements
Rank 1
answered on 12 Jan 2012, 08:28 PM
Maya, 

This is great but I am using the Expression Dark theme, this resets it to Office Black :(
Can you change it to pick up the theme from the parent or give me this style modified for Expression Black theme please?

Also, how do I control the border property? My problem with the built in border is that it is too thick, while this style removes it totally, can you point me to the xaml element which I can control to change the border thickness?

Thanks,
Kumar
0
Maya
Telerik team
answered on 13 Jan 2012, 06:58 AM
Hello Kumar,

You can use exactly the same idea on the style for GridViewRow for Expression_Dark Theme and edit the Padding value for the containing border. The default template is:

<Border Background="{StaticResource GridView_HierarchyBackground}"
                        grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                        Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="2" Padding="6"
                        BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,1"
                        Visibility="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource
 
BooleanToVisibilityConverter}}">
                        <ContentPresenter x:Name="PART_HierarchyChildPresenter"
 
grid:SelectiveScrollingGrid.SelectiveScrollingClip="True" />
                    </Border>

You can set the value of the Padding depending on the view you want to achieve. In the project attached above, this setting is removed.
Let me know in case you need further help.

Regards,
Maya
the Telerik team

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

Tags
GridView
Asked by
Kumar
Top achievements
Rank 1
Answers by
Maya
Telerik team
Kumar
Top achievements
Rank 1
Share this question
or