2010-09-24 42 views
1

關於如何實現'分層'gridview的任何想法?我想要的是親子級聯(多級)。 我正在使用LINQ to XML從XML文件中提取數據並將其保存在C#對象中,並使用所有不同級別的層次結構來顯示ListView控件中的數據。 (C#對象是Listview控件的數據源)。 在此先感謝。 中號分層GridView asp.net 3.5

有人可以幫我請..

我的C#對象:

1)AutoElements類:


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; 
     } 

    }

2)共同要素類:

public class CommonElements : CPRulesCommonElements 
    { 
    public class ClaimType 
     { 
      public string claim_date { get; set; } 
      public int claim_Age_Years {get; set;} 
      public int claim_Age_Months { get; set; } 
      public List policy { get; set; } 
      public List subject { get; set; } 
      public List address { get; set; } 
     } 

public class SubjectType : BaseSubjectType 
     { 
     public int unit_number {get; set;} 
     public IDREF id {get; set;} 
     public string id { get; set; } 

     } 
    public class BaseSubjectType 
    { 
     public string birthdate { get; set; } 
     public GenderEnum gender { get; set; } 
     public string ssn { get; set; } 
     public string deathdate { get; set; } 
     public string quoteback { get; set; } 
     public List address { get; set;} 
     public TelephoneType telephone { get; set; } 
     public List driversLicense { get; set; } 
    } 
public class DriversLicenseType : CPdriversLicenseType 
    { 
     public DriversLicenseClassificationEnum classification { get; set; } 
     public LenientDateType issue_date { get; set; } 
     public string issue_date { get; set; } 
     public LenientDateType expiration_date { get; set; } 
     public string expiration_date { get; set; } 
     public FSIEnum fsi_state { get; set; } 
     public FSIEnum fsi_number { get; set; } 
     public FSIEnum fsi_classification { get; set; } 
     public string license_type { get; set; } 
    } 
}

3)CPRulesCommonElements:

public class CPRulesCommonElements : Enums 

    { 
     public class telephoneType 
     { 
      public TelephoneTypeEnum type { get; set; } 
      public string country { get; set; } 
      public string area { get; set; } 
      public string exchange { get; set; } 
      public string number {get; set;} 
      public string extension {get; set;} 
     } 
     public class driversLicenseType 
     { 
      public List parameter { get; set; } 
      public DriversLicenseHistoryEnum history { get; set; } 
      public DriversLicenseTypeEnum type { get; set; } 
      public string state { get; set; } 
      public string number { get; set; } 

     }
+0

有人可以迴應我的問題。 – BumbleBee 2010-09-27 17:59:34

回答