Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
645
How to create Hierarchy out of a FlatDataSource
posted

Hi,

I have a tough time dealing with Infragistics xamPivotGird. I have classes say Customer and Address.

public class Customer

{

  string Name {get; set;}

  Address CustAddress {get; set;}

}

public Address

{

 string Street{get; set;}

 string State {get; set;}

 string City {get; set;}

 string ZipCode {get; set;}

}

In some cases, when my Address is null. while creating Hierarchy, using the below code, I don't see the Hierarchy being built or show up when expanded

 var hierarchy = new HierarchyDescriptor<Customer>(p => p.CustAddress );

 hierarchy.AddLevel(p => "All Addresses", "All Addresses");

 hierarchy.AddLevel(p => p.CustAddress.ZipCode?? "", "ZipCode");

Please guide me here.....Its kind of urgent.