Multi-Level Grouping
This article provides an overview on how you could enable multi-level grouping in RadListView.
Before proceeding please go through Grouping Overview topic.
First, let's create the following business object:
The next example demonstrates how RadListView could be bound to a collection of City objects and grouped hieararchically by Continent and Country.
To accomplish the task, create a ViewModel class as shown below:
Then, in order to visualize the hierarchical relation between groups, add a custom GroupHeaderTemplate (of type DataTemplate) to the Resources of your page:
where LevelToMarginConverter just calculates the margin of each group header according to its Level:
Lastly, add the RadListView definition with two PropertyGroupDescriptors as shown in the next snippet:
Here is the final result: