WPF DataGrid 分组

public  ListCollectionView collection;
collection = new ListCollectionView(obj.empData);

collection.GroupDescriptions.Add(new PropertyGroupDescription("Country"));
dgData.Items.SortDescriptions.Add
          (new System.ComponentModel.SortDescription
                   ("Country"
                    ,System.ComponentModel.ListSortDirection.Descending
                   )
           );

 

posted @ 2013-12-04 11:57  巴别塔  阅读(3518)  评论(0编辑  收藏  举报