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

Grouping data

1 Answer 87 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
plusHR
Top achievements
Rank 1
plusHR asked on 16 May 2012, 11:17 AM
Hi, I'm using the tree view component bound to an entity model, however I want to group some of the data so that the nodes are grouped;

In basics I have the following;

Template Type.....
Template Detail....
Template Category....
.........

The template detail will have multiple entries for multiple categories, what I want to do is two group the categories, where as at the moment if I have two records that have the same category linking to the same template detail, the node shows twice.

Thanks
P


1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 21 May 2012, 11:54 AM
Hi Paul,

I am not sure I understand the structure of your entity model and this is why I don't think I understand your scenario. Is your data in a flat collection, is it self-referencing? Or is it a hierarchical data? If it is a hierarchical data can you give us more details about its structure and the way you need to group it?

Basically the RadTreeView doesn't expose any grouping functionality - it allows you to structure your data in a hierarchy and use HierarchicalDataTemplates to display it inside the RadTreeViewItems. All data operations like grouping or sorting, should be applied on the business collection used as the ItemsSource of the control. You can examine this tutorial on how to bind the RadTreeView to a collection of items generated through a WCF service and/or at this forum post describing how to bind to a flat collection of self-referencing data.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeView
Asked by
plusHR
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or