代码:
1 var ds = (from v in XXXCollection 2 where ...... 3 select new { 4 ...... 5 ChildList = (from s in YYYCollection 6 where ...... 7 select new { 8 ...... 9 }).ToList() 10 }).ToList(); 11 gcDataCtrl.DataSource = ds;