dimanche 21 décembre 2014

Group by in c# for Document Directory having Column contain same value



I have Document Directory, in That I have Document Content type,and 1 more Columns Engagement , that columns have values comeing from term store.


Engagement Column value: AAA BBB CCC DDD EEE


so WHEN I upload Document that time 2 or more record have Engagement Column value are AAA or BBB . Now My Requirement is to Group by all record by Engagement Column value


My ref code:


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) {



}
}







0 commentaires:

Enregistrer un commentaire