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

GridView or TreeListView and how?

3 Answers 23 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gábor
Top achievements
Rank 1
Gábor asked on 15 Apr 2014, 10:18 AM
Hi!

I have the following data structure: 
A tree of objects of the same type. The number of children is not fixed nor the depth of the branches.
I want to be able to sort one selected node's children by some property. By default in TreeListView the sorting effects the whole tree.
So the result view should contain a header for every opened node to allow the user to sort every opened node's children by an arbitrary property.
This view is similar to a GridView with hierarchical child grids in arbitrary depth.
  
Which control should I use and how can I do this?

(I didn't find any demo similar enough to my goal to start the work from it)

Sorry for bad English,
Thanks for the answers!

3 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 18 Apr 2014, 06:41 AM
Hi,

I would recommend RadGridView with custom RowDetails template. I am attaching a sample project that demonstrates such scenario.

Regards,
Ivan Ivanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Gábor
Top achievements
Rank 1
answered on 22 Apr 2014, 10:59 AM
I want arbitrary deep hierarchy of objects where all the objects are from the same type. 
So your sample project doesn't provide a solution to my problem.
Could You take one more look at it?
0
Ivan Ivanov
Telerik team
answered on 25 Apr 2014, 09:23 AM
Hello,

It seems that both controls are not very suitable out of the box, but with certain modifications you can achieve the desired result. Basically, you can display arbitrary hierarchy level by setting RowDetailsTemplate on each of the nested RadGridViews. Overriding the default sorting behavior of RadTreeListView to sort only the root level items would be more complex task and it may interfere with other core features of RadTreeListView, so I would still recommend RadGridView. 

Regards,
Ivan Ivanov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Gábor
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Gábor
Top achievements
Rank 1
Share this question
or