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

How to create hierarchical grids in Q3 2009?

2 Answers 33 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 12 Nov 2009, 11:01 PM
I ported this silverlight example to WPF and it stopped working. I'm talking about the first project provided by Ross. I didn't change any code (other than the wpf/silverlight stuff) and it doesn't load any row in any of the child tables anymore.

I also took this other example, which is a WPF project already (ticketid-243249-hierarchychildtemplate.zip), switched the dll's for the Q3 release and it stopped working. Same problem, doesn't load any row.

My situation is simple, I wanna be able to create a hierarchy of .NET Objects like the following:

Clients
Offices
Contacts

I need to be able to define each column, I tried this code, which seems the most straight forward approach, but it doesn't let me define any column:

           <telerik:RadGridView.ChildTableDefinitions> 
                <telerik:GridViewTableDefinition AutoGenerateFieldDescriptors="False"
                    <telerik:GridViewTableDefinition.Relation> 
                        <data:PropertyRelation ParentPropertyName="Offices" /> 
                    </telerik:GridViewTableDefinition.Relation> 
                </telerik:GridViewTableDefinition> 
            </telerik:RadGridView.ChildTableDefinitions> 

I've tried many other approaches and samples, so far no luck. Any ideas?

2 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 13 Nov 2009, 09:22 AM

Hello Luis,

We have an example on our online demos that will help you implement this. The example is called Custom Hierarchy Template and can be found here under GridView -> Hierarchy. The key to customize the how your hierarchy looks like is to use the HierarchyChildTemplate property which is demonstrated in the sample.


Best wishes,
Milan
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
Luis
Top achievements
Rank 1
answered on 13 Nov 2009, 10:40 AM
Thank you, Milan. I had seen that example, I can't believe I hadn't tried it.
Tags
GridView
Asked by
Luis
Top achievements
Rank 1
Answers by
Milan
Telerik team
Luis
Top achievements
Rank 1
Share this question
or