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

[Solved] How to format child hierarchical grid

3 Answers 183 Views
GridView
This is a migrated thread and some comments may be shown as answers.
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

Sort by
0
Vlad
Telerik team
answered on 17 Sep 2009, 05:54 AM
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.
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?
0
Kalin Milanov
Telerik team
answered on 23 Sep 2009, 12:39 PM
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.
Tags
GridView
Asked by
John Morris
Top achievements
Rank 1
Answers by
Vlad
Telerik team
John Morris
Top achievements
Rank 1
Kalin Milanov
Telerik team
Share this question
or