views:

19

answers:

1

I would like to bind more than two different implementations of a class to a ListView and display the data in a Hierarchical structure (multi level).

Look at the Code below to understand where I'm coming from:

Thanks in advance M.

 
public class AutoElements : CommonElements
    {
       public class results_dataset
         {
            public List claimsHistory { get; set; }
          }      
        public class Claims_history
        {
            public List claim { get; set; }
            public typesectionEnum type; // attribute 
        }

        public class Claim : ClaimType
        {
            public string first_payment_date { get; set; }
            public ClaimAssociationIndicatorEnum claim_association_indicator;
            public List vehicle; 
        }

    } 
 public  class CommonElements : CPRulesCommonElements 
  {
     public class ClaimType
        {
            public string  claim_date { get; set; }
            public List address { get; set; }
        }

 public class SubjectType  : BaseSubjectType
      {
        public int unit_number {get; set;}
          .....       
      }
    public class BaseSubjectType
    {
        public List driversLicense { get; set; }
          ...
     }
 public class DriversLicenseType : CPdriversLicenseType 
    {
       public LenientDateType issue_date { get; set; }
        .....
    }
}  
   public class CPRulesCommonElements : Enums

    {
       public class telephoneType
        {
            public TelephoneTypeEnum type { get; set; }
            ......        }
        public class driversLicenseType
        {
            public DriversLicenseHistoryEnum history { get; set; }
             ......        
        }  
A: 

Create a temporary data structure from your classes and bind to that?

IrishChieftain
Irish, Could you please provide me an example. Thanks
BumbleBee
How are accessing the data for these classes initially?
IrishChieftain
My source is an XML file. I am using LINQ to XML to fetch the data from XML file and hold it in the classes.
BumbleBee