public GroupingDataContainer(DynamicGroupResult groupResult, int level)
 {
     this.Key   = groupResult.Key;
     this.Count = groupResult.Count;
     this.Level = level;
     if (groupResult.SubGroups != null)
     {
         this.HasSubgroups = true;
         var items = new List <GroupingDataContainer>();
         foreach (var group in groupResult.SubGroups)
         {
             items.Add(new GroupingDataContainer(group, this.Level + 1));
         }
         Items = items;
     }
     else
     {
         this.HasSubgroups = false;
         Items             = groupResult.Items;
     }
 }
 public GroupingDataContainer(DynamicGroupResult groupResult) : this(groupResult, 0)
 {
 }