Engagement Column value:
- AAA
- BBB
- CCC
- DDD
Now my requirement is to group all records by Engagement Column value
My ref code: //Column Field Name private string _EI_Field_Name = "Engagement_x0020_and_x0020_Inclusion_x0020_Document"; List listItems = list.Items.Cast().ToList(); if (listItems.Count > 0) { var groupedItems = listItems.GroupBy(a => a[_EI_Field_Name]).ToDictionary(g=>g.Key);
foreach (var groupItem in groupedItems) { foreach (var groupValue in groupItem) {
} } }
Replies
Know the answer? Post it — somebody with the same question will find it here.