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

Multiple levels hierarchy grid

1 Answer 108 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 16 Jul 2013, 02:56 PM
Hi,
I have a data source which is a BindingList<Project> where Project is a class containing a Parent and a Children properties (as well as other properties like Id, Name, Description etc). The Parent property is of type Project and the Children property is of type BindingList<Project>. Suppose i don't know in advance the depth of this hierarchy, how can i configure the GridView to display it right? I couldn't find any useful demo, are there any that concern my issue?

Thanks ahead,
Uri

---------------------------------------------------
I figured it out!
I've added a ParentId property to the Project class and added a self reference to the gridview's relations collection:
this.radGridView1.Relations.AddSelfReference(this.radGridView1.MasterTemplate, "Id", "ParentId");

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 19 Jul 2013, 11:58 AM
Hello Uri,

Thank you for writing.

I am glad that you have found a solution for your case. Also I want to draw your attention to the following topics:

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards, Dimitar
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or