This question is locked. New answers and comments are not allowed.
John Morris
Top achievements
Rank 1
John Morris
asked on 16 Sep 2009, 03:52 PM
Is it possible to format a child hierarchical grid? I want to turn off grouping, change the header titles, and prevent autogeneratecolumns.
3 Answers, 1 is accepted
0
Hello John,
You can use HierarchyChildTemplate to achieve this. For example:
<telerik:RadGridView
Name="RadGridView1">
<telerik:RadGridView.HierarchyChildTemplate>
<DataTemplate>
<telerik:GridViewDataControl AutoGenerateColumns="False">
<telerik:GridViewDataControl.Columns>
...
</telerik:GridViewDataControl.Columns>
</telerik:GridViewDataControl>
</DataTemplate>
</telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>
Best wishes,
Vlad
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.
You can use HierarchyChildTemplate to achieve this. For example:
<telerik:RadGridView
Name="RadGridView1">
<telerik:RadGridView.HierarchyChildTemplate>
<DataTemplate>
<telerik:GridViewDataControl AutoGenerateColumns="False">
<telerik:GridViewDataControl.Columns>
...
</telerik:GridViewDataControl.Columns>
</telerik:GridViewDataControl>
</DataTemplate>
</telerik:RadGridView.HierarchyChildTemplate>
</telerik:RadGridView>
Best wishes,
Vlad
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.
0
John Morris
Top achievements
Rank 1
answered on 18 Sep 2009, 02:25 AM
That is terrific Vlad, although I cannot seem to find the template where I can change the color of the container for the HierarchyChild. When a row is expanded to show the child, there is a border around the HierarchyChild that is orange (containing cell).
Is it possible to change this color and the margin width?
Is it possible to change this color and the margin width?
0
Hi John Morris,
I am sending you a sample which colors the background of the hierarchy presenter in red and reduces the margin a bit. Unfortunately to do so it requires a lot of digging into the XAML and I do have to confess it was a task which took too much time to complete.
On the bright side we have already decided to refactor the hierarchy templates which should ease the styling.
Let us know if you need further assistance.
Regards,
Kalin Milanov
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.
I am sending you a sample which colors the background of the hierarchy presenter in red and reduces the margin a bit. Unfortunately to do so it requires a lot of digging into the XAML and I do have to confess it was a task which took too much time to complete.
On the bright side we have already decided to refactor the hierarchy templates which should ease the styling.
Let us know if you need further assistance.
Regards,
Kalin Milanov
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.
