Enable Hierarchical Property Paths

The default behavior of the PropertyGroupDescription in LocalDataSourceProvider is to allow providing a property path that points to a direct property of the underlying data item.

The LocalDataSourceProvider supports also hierarchical (or chained) property paths. To enable this, set the EnableHierarchy property of LocalDataSourceProvider to True.

Defining a basic model to illustrate how the PropertyName relates to the underlying data item

public class Order 
    public Customer Customer { get; set; }         
    public string Product { get; set; } 
    public int Quantity { get; set; }         
    public string Promotion { get; set; }         
    public DateTime Date { get; set; }         
public class Customer 
    public string FirstName { get; set; } 
    public string LastName { get; set; } 
    public Company Company { get; set; } 
public class Company 
    public string Name { get; set; } 
    public string Industry { get; set; } 

Enabling hierarchical property paths and using nested property path

    <!-- we can assume that the data source provider in this example is populated with a collection of Order objects --> 
    <pivot:LocalDataSourceProvider x:Key="dataProvider" EnableHierarchy="True">          
            <!-- hierarchical property path --> 
            <pivot:PropertyGroupDescription PropertyName="Customer.Company.Industry" /> 
            <!-- standard/direct property path --> 
            <pivot:PropertyGroupDescription PropertyName="Promotion" /> 
            <pivot:PropertyGroupDescription PropertyName="Product" /> 
            <pivot:PropertyAggregateDescription PropertyName="Quantity" /> 
When LocalDataSourceProvider is linked to a RadPivotFieldList, the corresponding properties hierarchy for the PropertyGroupDescription will be displayed in the fields list.

PivotFieldList for WPF enable hierarchy

See Also

In this article