HierarchyDescriptor<Sale> productHierarchy =
new HierarchyDescriptor<Sale>(p => p.Product);
productHierarchy.AddLevel(p => "All products", "All products");
productHierarchy.AddLevel(p => p.Product.Name, "Product name");
flatDataSource.AddHierarchyDescriptor(productHierarchy);
HierarchyDescriptor<Sale> locationHierarchy =
new HierarchyDescriptor<Sale>(p => p.City);
locationHierarchy.AddLevel(p => "All locations", "All locations");
locationHierarchy.AddLevel(p => p.City, "City");
flatDataSource.AddHierarchyDescriptor(locationHierarchy);