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
420
How to display nested class properties in pivot data selector using flat data source
posted

Hi,

I have a collection of one class which has "nested collection of another class" as its property. Consider following class for example,

public class SOHoldingUIEntity
{
   public StockOptimisationStockHoldingEntity soh { get; set; }
   public string group_header { get; set; }
   public ObservableCollection<StockOptimisationStockHoldingItemEntity> soitems { get; set; }
   public SOHoldingUIEntity()
   {
      soitems = new ObservableCollection<StockOptimisationStockHoldingItemEntity>();
    }
}

I need to display pivot using Observable Collection of SOHoldingUIEntity class (using flat data source). How to bring up properties of StockOptimisationStockHoldingEntity in pivot data selector?

Has anyone created such pivot? Could someone please help me on this? 

Thanks in advance...

Parents
No Data
Reply
  • 2515
    Offline posted

    Hi rohanb,

     

    You can access nested properties in the HierarchyDescriptor.

     

    I'm not sure what you want to do with that data. We do support Hierarchy in our Grid control, so if you want to display your data you can use this control.

     

     

    If you want to use the analysis functionality of the PivotGrid you can flatten the data and create new IEnumerable.

    I would recommend to do that using LINQ or if not possible in your case you can do custom Enumerator, so to not duplicate all of the data. You can use functions in the HierarchyDescriptor.

     

     

    Thanks,

    George

Children