Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Obtaining like records
Message
De
22/10/2011 09:29:09
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Titre:
Obtaining like records
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Divers
Thread ID:
01527091
Message ID:
01527091
Vues:
81
I have a list that contains objects of a given class type which contains just a few properties. Two of these properties are:
string property called "Code"
string property called "HOCReason"

This list can contain any number of items from 0 to n most likely not more than 10 or 12 records. I need to show them in a parent / child manner where I group all the records with the same Code together as the parent, and then show the children as only the HOC Reasons for those Code types. I am programmatically adding these values to a treeview control. Is there a linq way to obtain these from my List?
Timothy

Svc_Code: 8FL Description: blah blah blah
HOC Reason: Whatever the reason is for this one
HOC Reason: Whatever this other reason may be
Svc_Code: 6SD Description: Some other description for this
HOC Reason: Some description for this item
Timothy Bryan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform