Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Obtaining like records
Message
From
22/10/2011 09:29:09
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
LINQ
Title:
Obtaining like records
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01527091
Message ID:
01527091
Views:
80
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
Next
Reply
Map
View

Click here to load this message in the networking platform